X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=bup.git;a=blobdiff_plain;f=lib%2Fcmd%2Fmeta-cmd.py;h=e006c0bc7421b59c50bacec2d16cdf9d6e3e2384;hp=2f30ce8ced2c1e5a255b26aa7faccfdd692ac717;hb=a4f58b2e4bb1a0208a9cec4b76a596d36134a881;hpb=ed4c09941a1f9df13ea3cd6a7522327c4009c8e4 diff --git a/lib/cmd/meta-cmd.py b/lib/cmd/meta-cmd.py index 2f30ce8..e006c0b 100755 --- a/lib/cmd/meta-cmd.py +++ b/lib/cmd/meta-cmd.py @@ -1,7 +1,16 @@ #!/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 +# Here to end of preamble replaced during install bup_python="$(dirname "$0")/bup-python" || exit $? -exec "$bup_python" "$0" ${1+"$@"} +exec "$bup_python" "$0" """ # end of bup preamble @@ -14,7 +23,7 @@ exec "$bup_python" "$0" ${1+"$@"} from __future__ import absolute_import import sys -from bup import metadata +from bup import compat, metadata from bup import options from bup.compat import argv_bytes from bup.io import byte_stream @@ -68,7 +77,7 @@ handle_ctrl_c() o = options.Options(optspec) (opt, flags, remainder) = o.parse(['--paths', '--symlinks', '--recurse'] - + sys.argv[1:]) + + compat.argv[1:]) opt.verbose = opt.verbose or 0 opt.quiet = opt.quiet or 0