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
18 import os.path, sys, platform
20 sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
22 from bup import _helpers, compat, metadata, options, version
23 from bup.io import byte_stream
27 def show_support(out, bool_opt, what):
28 out.write(b' %s: %s\n' % (what, b'yes' if bool_opt else b'no'))
33 o = options.Options(optspec)
34 opt, flags, extra = o.parse(compat.argv[1:])
37 out = byte_stream(sys.stdout)
39 out.write(b'bup %s\n' % version.version)
40 out.write(b'Source %s %s\n' % (version.commit, version.date))
42 have_readline = getattr(_helpers, 'readline', None)
43 have_libacl = getattr(_helpers, 'read_acl', None)
44 have_xattr = metadata.xattr
46 out.write(b' Python: %s\n' % platform.python_version().encode('ascii'))
47 show_support(out, have_readline, b'Command line editing (e.g. bup ftp)')
48 show_support(out, have_libacl, b'Saving and restoring POSIX ACLs')
49 show_support(out, have_xattr, b'Saving and restoring extended attributes (xattrs)')