httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r833633 - /httpd/site/trunk/dist/tools/roll.sh
Date Sat, 07 Nov 2009 05:34:05 GMT
Author: fuankg
Date: Sat Nov  7 05:34:05 2009
New Revision: 833633

URL: http://svn.apache.org/viewvc?rev=833633&view=rev
Log:
rewrote signing section; this also fixes a bug where
a wrong signature was created for the .dep files when
pgp is used for signing.

Modified:
    httpd/site/trunk/dist/tools/roll.sh

Modified: httpd/site/trunk/dist/tools/roll.sh
URL: http://svn.apache.org/viewvc/httpd/site/trunk/dist/tools/roll.sh?rev=833633&r1=833632&r2=833633&view=diff
==============================================================================
--- httpd/site/trunk/dist/tools/roll.sh (original)
+++ httpd/site/trunk/dist/tools/roll.sh Sat Nov  7 05:34:05 2009
@@ -87,6 +87,7 @@
 
 # check for executables
 gpg="`which gpg 2> /dev/null | head -1`"
+pgp="`which pgp 2> /dev/null | head -1`"
 openssl="`which openssl 2> /dev/null | head -1`"
 md5sum="`which md5sum 2> /dev/null | head -1`"
 sha1sum="`which sha1sum 2> /dev/null | head -1`"
@@ -165,35 +166,30 @@
 echo "Cleaning up and signing the files ..."
 echo ""
 
-if test -x "`which pgp 2> /dev/null`"; then
+# if found we use pgp for signing the files
+if test -x "${pgp}"; then
   if test -n "${user}"; then
     args="-u ${user}"
   fi
-
-  pgp -sba ${dirname}.tar.gz ${args}
-  pgp -sba ${dirname}.tar.bz2 ${args}
-  if test -f "${dirname}-deps.tar.gz"; then
-    pgp -sba ${dirname}.tar.gz ${args}
-  fi
-
-  if test -f "${dirname}-deps.tar.bz2"; then
-    pgp -sba ${dirname}.tar.bz2 ${args}
-  fi
-elif test -x "`which gpg 2> /dev/null`"; then
+  for file; do
+    if test -f "${file}"; then
+      echo "pgp: creating asc signature file for ${file} ..."
+      ${pgp} -sba ${file} ${args}
+    fi
+  done
+# no pgp found - check for gpg
+elif test -x "${gpg}"; then
   if test -z "${user}"; then
     args="--default-key ${args}"
   else
     args="-u ${user} ${args}"
   fi
-
-  gpg --armor ${args} --detach-sign ${dirname}.tar.gz
-  gpg --armor ${args} --detach-sign ${dirname}.tar.bz2
-  if test -f "${dirname}-deps.tar.gz"; then
-    gpg --armor ${args} --detach-sign ${dirname}-deps.tar.gz
-  fi
-  if test -f "${dirname}-deps.tar.bz2"; then
-    gpg --armor ${args} --detach-sign ${dirname}-deps.tar.bz2
-  fi
+  for file; do
+    if test -f "${file}"; then
+      echo "gpg: creating asc signature file for ${file} ..."
+      ${gpg} --armor ${args} --detach-sign ${file}
+    fi
+  done
 else
   echo "PGP or GnuPG not found!  Not signing release!"
 fi



Mime
View raw message