diff --git a/scripts/pkg.sh b/scripts/pkg.sh index d0b327ab..4d2acf21 100644 --- a/scripts/pkg.sh +++ b/scripts/pkg.sh @@ -607,7 +607,17 @@ install_exe_wrapper() case $ext in py) - echo -e "#!/usr/bin/python\n\nimport sys\nimport subprocess\nargs=sys.argv; args[0] = \"$from\"\nsubprocess.call([ '/usr/bin/python' ] + args)" > "$tmp" + cat << EOT | sed 's/^ *|//' > "$tmp" + |#!/usr/bin/python + | + |import sys + |import subprocess + |args=sys.argv + |args[0] = "$from" + |if subprocess.call([ '/usr/bin/python' ] + args) != 0: + | print("subprocess failed") + | exit(1) +EOT ;; pl) echo -e "#!/bin/bash\n\nexec /usr/bin/perl \"$from\" \"\$@\"" > "$tmp"