[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [builders/tor-browser-build] 30/32: Bug 40414: Improve linux-signer-gpg-sign



This is an automated email from the git hooks/post-receive script.

boklm pushed a commit to branch maint-11.0
in repository builders/tor-browser-build.

commit 209de9b1f1ffddba748ae25996f0ec26cecebd4d
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
AuthorDate: Tue Mar 22 18:59:35 2022 +0100

    Bug 40414: Improve linux-signer-gpg-sign
    
    - Automatically change to ~/$tbb_version directory
    - allow setting password with an environment variable (useful for
      tor-browser-build#40476)
---
 tools/signing/linux-signer-gpg-sign | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tools/signing/linux-signer-gpg-sign b/tools/signing/linux-signer-gpg-sign
index 723599b..35058df 100755
--- a/tools/signing/linux-signer-gpg-sign
+++ b/tools/signing/linux-signer-gpg-sign
@@ -1,6 +1,12 @@
 #!/bin/bash
+set -e
 
-read -sp "Enter passphrase: " pass
+script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+source "$script_dir/functions"
+
+cd ~/"$tbb_version"
+
+test -n "$GPG_PASS" || read -sp "Enter gpg passphrase: " GPG_PASS
 for i in `find . -name "*.dmg" -o -name "*.exe" -o -name "*.tar.xz" -o -name "*.txt" -o -name "*.zip" -o -name "*.tar.gz" -o -name "*.apk" | sort`
 do
   if test -f "$i.asc"
@@ -9,6 +15,5 @@ do
     rm -f "$i.asc"
   fi
   echo "Signing $i"
-  echo "$pass" | gpg -absu 0xe53d989a9e2d47bf! --passphrase-fd 0 $i
-  test $? || echo "Signing $i failed"
+  echo "$GPG_PASS" | gpg -absu 0xe53d989a9e2d47bf! --passphrase-fd 0 $i
 done

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits