From 5f6e49474362e62d57b586dff045023b05fd73bb Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 4 Oct 2017 11:01:15 +0000 Subject: [PATCH] link-in target: Propagate python script error from pkg.sh Signed-off-by: Jan Lindemann --- scripts/pkg.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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"