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
19 # Intentionally replace the dirname "$0" that python prepends
21 sys.path[0] = os.path.dirname(os.path.realpath(__file__)) + '/..'
23 from bup import compat, git, options, client
24 from bup.helpers import log, saved_errors
25 from bup.compat import argv_bytes
29 [BUP_DIR=...] bup init [-r host:path]
31 r,remote= remote repository path
33 o = options.Options(optspec)
34 opt, flags, extra = o.parse(compat.argv[1:])
37 o.fatal("no arguments expected")
41 git.init_repo() # local repo
42 except git.GitError as e:
43 log("bup: error: could not init repository: %s" % e)
47 git.check_repo_or_die()
48 cli = client.Client(argv_bytes(opt.remote), create=True)