directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1165250 - in /directory/studio/trunk: application/application-release/src/main/resources/sign.sh tools/sign.sh
Date Mon, 05 Sep 2011 12:05:31 GMT
Author: elecharny
Date: Mon Sep  5 12:05:30 2011
New Revision: 1165250

URL: http://svn.apache.org/viewvc?rev=1165250&view=rev
Log:
Updated the sign.sh script

Modified:
    directory/studio/trunk/application/application-release/src/main/resources/sign.sh
    directory/studio/trunk/tools/sign.sh

Modified: directory/studio/trunk/application/application-release/src/main/resources/sign.sh
URL: http://svn.apache.org/viewvc/directory/studio/trunk/application/application-release/src/main/resources/sign.sh?rev=1165250&r1=1165249&r2=1165250&view=diff
==============================================================================
--- directory/studio/trunk/application/application-release/src/main/resources/sign.sh (original)
+++ directory/studio/trunk/application/application-release/src/main/resources/sign.sh Mon
Sep  5 12:05:30 2011
@@ -1,27 +1,22 @@
 #!/bin/sh
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-# http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-PASSWORD=@password@
-
-for FILE in $(find . -not '(' -name "sign.sh" -or -name ".*" -or -name "*.md5" -or -name
"*.sha1" -or -name "*.asc" ')' -and -type f) ; 
-do
-    echo "-> Signing '$FILE' ..."
-    
+
+echo "PGP Key ID: "
+read DEFAULT_KEY
+
+echo "PGP Key Password: "
+stty -echo
+read PASSWORD
+stty echo
+echo ""
+
+for FILE in $(find . -maxdepth 1 -not '(' -name "sign.sh" -or -name ".*" -or -name "*.md5"
-or -name "*.sha1" -or -name "*.asc" ')' -and -type f) ; do
+    if [ -f "$FILE.asc" ]; then
+        echo "Skipping: $FILE"
+        continue
+    fi
+
+    echo -n "Signing: $FILE ... "
+
     # MD5
     if [ ! -f "$FILE.md5" ];
     then
@@ -30,26 +25,22 @@ do
     else
         echo "  - Skipped '$FILE.md5' (file already existing)"
     fi
-    
-    
+
     # SHA1
     if [ ! -f "$FILE.sha1" ];
     then
-        gpg --print-md SHA1 "$FILE" > "$FILE".sha1
+        gpg --default-key "$DEFAULT_KEY" --print-md SHA1 "$FILE" > "$FILE".sha1
         echo "  - Generated '$FILE.sha1'"
     else
         echo "  - Skipped '$FILE.sha1' (file already existing)"
     fi
-    
-    
+ 
     # ASC
     if [ ! -f "$FILE.asc" ];
     then
-        echo "$PASSWORD" | gpg --detach-sign --armor --no-tty --yes --passphrase-fd 0 "$FILE"
+        echo "$PASSWORD" | gpg --default-key "$DEFAULT_KEY" --detach-sign --armor --no-tty
--yes --passphrase-fd 0 "$FILE"
         echo "  - Generated '$FILE.asc'"
     else
         echo "  - Skipped '$FILE.asc' (file already existing)"
     fi
-
 done
-

Modified: directory/studio/trunk/tools/sign.sh
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tools/sign.sh?rev=1165250&r1=1165249&r2=1165250&view=diff
==============================================================================
--- directory/studio/trunk/tools/sign.sh (original)
+++ directory/studio/trunk/tools/sign.sh Mon Sep  5 12:05:30 2011
@@ -1,15 +1,15 @@
 #!/bin/sh
 
-echo -n "PGP Key ID: "
+echo "PGP Key ID: "
 read DEFAULT_KEY
 
-echo -n "PGP Key Password: "
+echo "PGP Key Password: "
 stty -echo
 read PASSWORD
 stty echo
 echo ""
 
-for FILE in $(find . -not '(' -name "sign.sh" -or -name ".*" -or -name "*.md5" -or -name
"*.sha1" -or -name "*.asc" ')' -and -type f) ; do
+for FILE in $(find . -maxdepth 1 -not '(' -name "sign.sh" -or -name ".*" -or -name "*.md5"
-or -name "*.sha1" -or -name "*.asc" ')' -and -type f) ; do
     if [ -f "$FILE.asc" ]; then
         echo "Skipping: $FILE"
         continue
@@ -29,7 +29,7 @@ for FILE in $(find . -not '(' -name "sig
     # SHA1
     if [ ! -f "$FILE.sha1" ];
     then
-        gpg --print-md SHA1 "$FILE" > "$FILE".sha1
+        gpg --default-key "$DEFAULT_KEY" --print-md SHA1 "$FILE" > "$FILE".sha1
         echo "  - Generated '$FILE.sha1'"
     else
         echo "  - Skipped '$FILE.sha1' (file already existing)"
@@ -38,7 +38,7 @@ for FILE in $(find . -not '(' -name "sig
     # ASC
     if [ ! -f "$FILE.asc" ];
     then
-        echo "$PASSWORD" | gpg --detach-sign --armor --no-tty --yes --passphrase-fd 0 "$FILE"
+        echo "$PASSWORD" | gpg --default-key "$DEFAULT_KEY" --detach-sign --armor --no-tty
--yes --passphrase-fd 0 "$FILE"
         echo "  - Generated '$FILE.asc'"
     else
         echo "  - Skipped '$FILE.asc' (file already existing)"



Mime
View raw message