2 from bup import git, options, client
3 from bup.helpers import *
6 [BUP_DIR=...] bup init [-r host:path]
8 r,remote= remote repository path
10 o = options.Options('bup init', optspec)
11 (opt, flags, extra) = o.parse(sys.argv[1:])
14 o.fatal("no arguments expected")
18 if opt.remote and opt.remote.find(":") == -1:
19 o.fatal("--remote argument must contain a colon")
20 git.init_repo() # local repo
21 git.check_repo_or_die()
23 cli = client.Client(opt.remote, create=True)
24 except client.ClientError:
25 o.fatal("server exited unexpectedly; see errors above")