import sys, os, subprocess, signal, getopt
argv = sys.argv
-exe = argv[0]
+exe = os.path.realpath(argv[0])
exepath = os.path.split(exe)[0] or '.'
exeprefix = os.path.split(os.path.abspath(exepath))[0]
usage('error: %s' % ex.msg)
help_requested = None
-dest_dir = None
do_profile = False
for opt in global_args:
elif opt[0] in ['--profile']:
do_profile = True
elif opt[0] in ['-d', '--bup-dir']:
- dest_dir = opt[1]
+ os.environ['BUP_DIR'] = opt[1]
else:
usage('error: unexpected option "%s"' % opt[0])
if not subcmd_name:
usage()
-subcmd_env = os.environ
-if dest_dir:
- subcmd_env.update({"BUP_DIR" : dest_dir})
-
def subpath(s):
sp = os.path.join(exepath, 'bup-%s' % s)
if not os.path.exists(sp):