link-in target: Propagate python script error from pkg.sh

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-10-04 11:01:15 +00:00
commit 5f6e494743

View file

@ -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"