[Reproducible-builds] [misc] 03/07: test-reproducibility: allow to specify a script or a command to run

Jérémy Bobbio lunar at moszumanska.debian.org
Sun Aug 31 19:09:56 UTC 2014


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

lunar pushed a commit to branch master
in repository misc.

commit e5fa452d75db2cc041455be609c6a42b6da306ea
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sun Aug 31 18:02:48 2014 +0000

    test-reproducibility: allow to specify a script or a command to run
---
 test-reproducibility/test-reproducibility | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test-reproducibility/test-reproducibility b/test-reproducibility/test-reproducibility
index 807f51d..6f48016 100755
--- a/test-reproducibility/test-reproducibility
+++ b/test-reproducibility/test-reproducibility
@@ -9,6 +9,11 @@ for cmd in faketime proot sudo unshare; do
 	fi
 done
 
+if [ $# -eq 0 ]; then
+	echo "Usage: $0 <script|-c command ...>" >&2
+	exit 253
+fi
+
 NOW="$(date +%s)"
 
 TEST_REPRODUCIBILITY_TMPDIR="$(mktemp -d)"
@@ -19,6 +24,15 @@ fi
 trap "rm -rf '$TEST_REPRODUCIBILITY_TMPDIR'" EXIT
 FAKETIME_RECORD_FILE="$TEST_REPRODUCIBILITY_TMPDIR/faketime-record"
 
+if [ "$1" = "-c" ]; then
+	shift
+	COMMAND="$TEST_REPRODUCIBILITY_TMPDIR/command"
+	echo "#!/bin/sh" > "$COMMAND"
+	echo "$@" >> "$COMMAND"
+	chmod +x "$COMMAND"
+else
+	COMMAND="$1"
+fi
 
 run_baseline() {
 	FAKETIME_SAVE_FILE="$FAKETIME_RECORD_FILE" faketime "@+$NOW" $COMMAND

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-builds mailing list