diff options
Diffstat (limited to 'scripts/bootstrap/compile.sh')
-rwxr-xr-x | scripts/bootstrap/compile.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh index 09bb32cff1..2cb8e58710 100755 --- a/scripts/bootstrap/compile.sh +++ b/scripts/bootstrap/compile.sh @@ -227,6 +227,31 @@ cat <<'EOF' >${ARCHIVE_DIR}/_embedded_binaries/process-wrapper${EXE_EXT} #!/bin/sh # Dummy process wrapper, does not support timeout shift 2 +stdout="$1" +stderr="$2" +shift 2 + +if [ "$stdout" = "-" ] +then + if [ "$stderr" = "-" ] + then + "$@" + exit $? + else + "$@" 2>"$stderr" + exit $? + fi +else + if [ "$stderr" = "-" ] + then + "$@" >"$stdout" + exit $? + else + "$@" 2>"$stderr" >"$stdout" + exit $? + fi +fi + "$@" exit $? |