3 # https://sourceware.org/bugzilla/show_bug.cgi?id=26034
4 export "BUP_ARGV_0"="$0"
7 export "BUP_ARGV_${arg_i}"="$arg"
11 # Here to end of preamble replaced during install
12 bup_python="$(dirname "$0")/../../config/bin/python" || exit $?
13 exec "$bup_python" "$0"
17 from __future__ import absolute_import, print_function
19 # Intentionally replace the dirname "$0" that python prepends
21 sys.path[0] = os.path.dirname(os.path.realpath(__file__)) + '/..'
25 from bup import _helpers, compat, metadata, options, version
26 from bup.io import byte_stream
30 def show_support(out, bool_opt, what):
31 out.write(b' %s: %s\n' % (what, b'yes' if bool_opt else b'no'))
36 o = options.Options(optspec)
37 opt, flags, extra = o.parse(compat.argv[1:])
40 out = byte_stream(sys.stdout)
42 out.write(b'bup %s\n' % version.version)
43 out.write(b'Source %s %s\n' % (version.commit, version.date))
45 have_readline = getattr(_helpers, 'readline', None)
46 have_libacl = getattr(_helpers, 'read_acl', None)
47 have_xattr = metadata.xattr
49 out.write(b' Python: %s\n' % platform.python_version().encode('ascii'))
50 show_support(out, have_readline, b'Command line editing (e.g. bup ftp)')
51 show_support(out, have_libacl, b'Saving and restoring POSIX ACLs')
52 show_support(out, have_xattr, b'Saving and restoring extended attributes (xattrs)')