diff options
Diffstat (limited to 'generate-python.sh')
-rwxr-xr-x | generate-python.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/generate-python.sh b/generate-python.sh new file mode 100755 index 0000000000..31ac115689 --- /dev/null +++ b/generate-python.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +if test $# -ne 3 +then + echo >&2 "USAGE: $0 <GIT_BUILD_OPTIONS> <INPUT> <OUTPUT>" + exit 1 +fi + +GIT_BUILD_OPTIONS="$1" +INPUT="$2" +OUTPUT="$3" + +. "$GIT_BUILD_OPTIONS" + +sed -e "1s|#!.*python|#!$PYTHON_PATH|" \ + "$INPUT" >"$OUTPUT+" +chmod a+x "$OUTPUT+" +mv "$OUTPUT+" "$OUTPUT" |