[tor-commits] [tor-browser-bundle/master] Fix argument handling on record-inputs.sh
mikeperry at torproject.org
mikeperry at torproject.org
Fri Nov 15 07:45:19 UTC 2013
commit 9989ac8a32247e1a45b193b559fbe98d3a1d5e15
Author: Mike Perry <mikeperry-git at torproject.org>
Date: Thu Nov 14 23:44:59 2013 -0800
Fix argument handling on record-inputs.sh
---
gitian/record-inputs.sh | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/gitian/record-inputs.sh b/gitian/record-inputs.sh
index 9bc1f7c..4fc79dd 100755
--- a/gitian/record-inputs.sh
+++ b/gitian/record-inputs.sh
@@ -1,8 +1,11 @@
#!/bin/bash
+WRAPPER_DIR=$(dirname "$0")
+WRAPPER_DIR=$(readlink -f "$WRAPPER_DIR")
+
if [ -z "$1" ];
then
- VERSIONS_FILE=./versions
+ VERSIONS_FILE=$WRAPPER_DIR/versions
else
VERSIONS_FILE=$1
fi
@@ -14,13 +17,7 @@ fi
. $VERSIONS_FILE
-WRAPPER_DIR=$PWD
-
-if [ -z "$1" ]; then
- INPUTS_DIR=$PWD/../../gitian-builder/inputs
-else
- INPUTS_DIR=$1
-fi
+INPUTS_DIR=$WRAPPER_DIR/../../gitian-builder/inputs
cd $INPUTS_DIR
More information about the tor-commits
mailing list