[tbb-commits] [tor-browser-bundle/master] Revert "Bug 20147: (re-)dzip.sh: various improvements"
gk at torproject.org
gk at torproject.org
Fri Dec 9 18:48:50 UTC 2016
commit d9a6d915e72b5caa782285547a5b9c15afba2989
Author: Georg Koppen <gk at torproject.org>
Date: Fri Dec 9 18:48:07 2016 +0000
Revert "Bug 20147: (re-)dzip.sh: various improvements"
This reverts commit ea31d520646c07f1565460565f5ead9ad7741b84.
Backing out for Firefox bustage in the Windows step.
---
gitian/build-helpers/dzip.sh | 17 +++++++++--------
gitian/build-helpers/re-dzip.sh | 23 +++++++++++++----------
2 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/gitian/build-helpers/dzip.sh b/gitian/build-helpers/dzip.sh
index 64fcdca..5772c8b 100755
--- a/gitian/build-helpers/dzip.sh
+++ b/gitian/build-helpers/dzip.sh
@@ -1,13 +1,14 @@
-#!/bin/sh -e
+#!/bin/sh
# Crappy deterministic zip wrapper
export LC_ALL=C
-ZIPFILE=${1:?}
+ZIPFILE=$1
shift
-if [ -n "$REFERENCE_DATETIME" ]; then
- find "$@" -exec touch --date="$REFERENCE_DATETIME" -- {} +
-fi
-find "$@" -executable -exec chmod 700 {} +
-find "$@" ! -executable -exec chmod 600 {} +
-find "$@" | sort | zip $ZIPOPTS -X -@ "$ZIPFILE"
+[ -n "$REFERENCE_DATETIME" ] && \
+ find $@ -exec touch --date="$REFERENCE_DATETIME" {} \;
+
+find $@ -executable -exec chmod 700 {} \;
+find $@ ! -executable -exec chmod 600 {} \;
+
+find $@ | sort | zip $ZIPOPTS -X -@ "$ZIPFILE"
diff --git a/gitian/build-helpers/re-dzip.sh b/gitian/build-helpers/re-dzip.sh
index 8e8abbf..27828e9 100755
--- a/gitian/build-helpers/re-dzip.sh
+++ b/gitian/build-helpers/re-dzip.sh
@@ -1,14 +1,17 @@
-#!/bin/sh -e
+#!/bin/sh
# Crappy deterministic zip repackager
export LC_ALL=C
-ZIPFILE_BASENAME=$(basename -- "${1:?}")
-TEMPDIR=tmp-re-dzip-$$
-RE_DZIP=$(readlink -f -- "$(which -- "$0")")
-PATH=$PATH:$(dirname "$RE_DZIP")
+ZIPFILE=`basename $1`
-mkdir "$TEMPDIR"
-unzip $UNZIPOPTS -d "$TEMPDIR" -- "$1" || [ $? -lt 3 ]
-(cd "$TEMPDIR"; dzip.sh ./"$ZIPFILE_BASENAME" .)
-mv -- "$TEMPDIR"/"$ZIPFILE_BASENAME" "$1"
-rm -rf "$TEMPDIR"
+mkdir tmp_dzip
+cd tmp_dzip
+unzip ../$1
+[ -n "$REFERENCE_DATETIME" ] && \
+ find . -exec touch --date="$REFERENCE_DATETIME" {} \;
+find . -executable -exec chmod 700 {} \;
+find . ! -executable -exec chmod 600 {} \;
+find . | sort | zip $ZIPOPTS -X -@ $ZIPFILE
+mv $ZIPFILE ../$1
+cd ..
+rm -rf tmp_dzip
More information about the tbb-commits
mailing list