[tor-commits] [tor-browser-bundle/master] Bug #10103: Make more scripts support multiple versions files.

mikeperry at torproject.org mikeperry at torproject.org
Tue Nov 12 06:29:46 UTC 2013


commit d6c8ba15f0307e165d0b50a04e9703f14bbcf333
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Mon Nov 11 22:24:43 2013 -0800

    Bug #10103: Make more scripts support multiple versions files.
---
 gitian/Makefile            |    2 +-
 gitian/hash-bundles.sh     |   14 +++++++++++++-
 gitian/mkbundle-linux.sh   |    4 ++--
 gitian/mkbundle-mac.sh     |    4 ++--
 gitian/mkbundle-windows.sh |    4 ++--
 5 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/gitian/Makefile b/gitian/Makefile
index 7fe3894..bbabc10 100644
--- a/gitian/Makefile
+++ b/gitian/Makefile
@@ -12,7 +12,7 @@ build-alpha:
 	./mkbundle-linux.sh versions.alpha
 	./mkbundle-windows.sh versions.alpha
 	./mkbundle-mac.sh versions.alpha
-	./hash-bundles.sh
+	./hash-bundles.sh versions.alpha
 
 prep:
 	./check-prerequisites.sh
diff --git a/gitian/hash-bundles.sh b/gitian/hash-bundles.sh
index 2316182..cbc0539 100755
--- a/gitian/hash-bundles.sh
+++ b/gitian/hash-bundles.sh
@@ -1,7 +1,19 @@
 #!/bin/bash
 #
 
-. ./versions
+if [ -z "$1" ];
+then
+  VERSIONS_FILE=./versions
+else
+  VERSIONS_FILE=$1
+fi
+
+if ! [ -e $VERSIONS_FILE ]; then
+  echo >&2 "Error: $VERSIONS_FILE file does not exist"
+  exit 1
+fi
+
+. $VERSIONS_FILE
 
 export LC_ALL=C
 
diff --git a/gitian/mkbundle-linux.sh b/gitian/mkbundle-linux.sh
index 7db7316..fd5e924 100755
--- a/gitian/mkbundle-linux.sh
+++ b/gitian/mkbundle-linux.sh
@@ -127,8 +127,8 @@ then
   echo "****** Starting Bundling+Localization of Linux Bundle (3/3 for Linux) ******"
   echo 
   
-  cp -a $WRAPPER_DIR/versions $GITIAN_DIR/inputs/
-  cd $WRAPPER_DIR && ./record-inputs.sh && cd $GITIAN_DIR
+  cp -a $WRAPPER_DIR/$VERSIONS_FILE $GITIAN_DIR/inputs/versions
+  cd $WRAPPER_DIR && ./record-inputs.sh $VERSIONS_FILE && cd $GITIAN_DIR
   
   ./bin/gbuild -j $NUM_PROCS --commit https-everywhere=$HTTPSE_TAG,tor-launcher=$TORLAUNCHER_TAG,torbutton=$TORBUTTON_TAG $DESCRIPTOR_DIR/linux/gitian-bundle.yml
   if [ $? -ne 0 ];
diff --git a/gitian/mkbundle-mac.sh b/gitian/mkbundle-mac.sh
index 6ddcf24..f64e7af 100755
--- a/gitian/mkbundle-mac.sh
+++ b/gitian/mkbundle-mac.sh
@@ -124,8 +124,8 @@ then
   echo "****** Starting Bundling+Localization Component of Mac Bundle (3/3 for Mac) ******"
   echo 
   
-  cp -a $WRAPPER_DIR/versions $GITIAN_DIR/inputs/
-  cd $WRAPPER_DIR && ./record-inputs.sh && cd $GITIAN_DIR
+  cp -a $WRAPPER_DIR/$VERSIONS_FILE $GITIAN_DIR/inputs/versions
+  cd $WRAPPER_DIR && ./record-inputs.sh $VERSIONS_FILE && cd $GITIAN_DIR
   
   ./bin/gbuild -j $NUM_PROCS --commit https-everywhere=$HTTPSE_TAG,torbutton=$TORBUTTON_TAG,tor-launcher=$TORLAUNCHER_TAG $DESCRIPTOR_DIR/mac/gitian-bundle.yml
   if [ $? -ne 0 ];
diff --git a/gitian/mkbundle-windows.sh b/gitian/mkbundle-windows.sh
index 5241722..28b61b8 100755
--- a/gitian/mkbundle-windows.sh
+++ b/gitian/mkbundle-windows.sh
@@ -124,8 +124,8 @@ then
   echo "****** Starting Bundling+Localization of Windows Bundle (3/3 for Windows) ******"
   echo 
   
-  cp -a $WRAPPER_DIR/versions $GITIAN_DIR/inputs/
-  cd $WRAPPER_DIR && ./record-inputs.sh && cd $GITIAN_DIR
+  cp -a $WRAPPER_DIR/$VERSIONS_FILE $GITIAN_DIR/inputs/versions
+  cd $WRAPPER_DIR && ./record-inputs.sh $VERSIONS_FILE && cd $GITIAN_DIR
   
   ./bin/gbuild -j $NUM_PROCS --commit https-everywhere=$HTTPSE_TAG,torbutton=$TORBUTTON_TAG,tor-launcher=$TORLAUNCHER_TAG,tbb-windows-installer=$NSIS_TAG $DESCRIPTOR_DIR/windows/gitian-bundle.yml
   if [ $? -ne 0 ];



More information about the tor-commits mailing list