]> arthur.barton.de Git - bup.git/blobdiff - main.py
options.py: make --usage just print the usage message.
[bup.git] / main.py
diff --git a/main.py b/main.py
index 3d56ed49f44018adebf326d7e5432f55b9a903f4..bd6fb0b8964925f78a7f61899899e01457f6915e 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -30,7 +30,7 @@ from bup.helpers import *
 os.environ['WIDTH'] = str(tty_width())
 
 def usage():
-    log('Usage: bup [-?|--help] [-d BUP_DIR] [--debug] [--profile]'
+    log('Usage: bup [-?|--help] [-d BUP_DIR] [--debug] [--profile] '
         '<command> [options...]\n\n')
     common = dict(
         ftp = 'Browse backup sets using an ftp-like client',
@@ -169,7 +169,12 @@ p = None
 try:
     try:
         c = (do_profile and [sys.executable, '-m', 'cProfile'] or []) + subcmd
-        p = subprocess.Popen(c, stdout=outf, stderr=errf, preexec_fn=force_tty)
+        if not n and not outf and not errf:
+            # shortcut when no bup-newliner stuff is needed
+            os.execvp(c[0], c)
+        else:
+            p = subprocess.Popen(c, stdout=outf, stderr=errf,
+                                 preexec_fn=force_tty)
         while 1:
             # if we get a signal while waiting, we have to keep waiting, just
             # in case our child doesn't die.