]> arthur.barton.de Git - bup.git/blobdiff - dev/echo-argv-bytes
chmod -x lib/bup/cmd/*.py
[bup.git] / dev / echo-argv-bytes
index d49c26cc751e5e908a24a97f4878670b9c1195c9..f9a71c2fb2fe9589254e34855efaccbaacfa1450 100755 (executable)
@@ -1,17 +1,8 @@
 #!/bin/sh
 """": # -*-python-*-
-# https://sourceware.org/bugzilla/show_bug.cgi?id=26034
-export "BUP_ARGV_0"="$0"
-arg_i=1
-for arg in "$@"; do
-    export "BUP_ARGV_${arg_i}"="$arg"
-    shift
-    arg_i=$((arg_i + 1))
-done
-bup_python="$(dirname "$0")/../config/bin/python" || exit $?
-exec "$bup_python" "$0"
+bup_exec="$(dirname "$0")/bup-exec" || exit $?
+exec "$bup_exec" "$0" ${1+"$@"}
 """
-# end of bup preamble
 
 from __future__ import absolute_import, print_function
 
@@ -19,12 +10,9 @@ from os.path import abspath, dirname
 from sys import stdout
 import os, sys
 
-script_home = abspath(dirname(__file__))
-sys.path[:0] = [abspath(script_home + '/../../lib'), abspath(script_home + '/../..')]
-
 from bup import compat
 
-for arg in compat.argvb:
+for arg in compat.get_argvb():
     os.write(stdout.fileno(), arg)
     os.write(stdout.fileno(), b'\0\n')
     stdout.flush()