]> arthur.barton.de Git - bup.git/blobdiff - cmd/import-duplicity-cmd.py
Add repo abstraction and use it in join
[bup.git] / cmd / import-duplicity-cmd.py
index 163d4faf8101e4ac61d48c258c9c2384d1f67ee5..0d4f5593ac2aa635451579dfad17b8c5ec07cdf0 100755 (executable)
@@ -1,14 +1,19 @@
-#!/usr/bin/env python
+#!/bin/sh
+"""": # -*-python-*-
+bup_python="$(dirname "$0")/bup-python" || exit $?
+exec "$bup_python" "$0" ${1+"$@"}
+"""
+# end of bup preamble
 
 from calendar import timegm
 from pipes import quote
-from subprocess import check_call, check_output
+from subprocess import check_call
 from time import strftime, strptime
 import sys
 import tempfile
 
 from bup import git, options, vfs
-from bup.helpers import handle_ctrl_c, log, saved_errors, unlink
+from bup.helpers import handle_ctrl_c, log, readpipe, saved_errors, unlink
 import bup.path
 
 optspec = """
@@ -35,7 +40,7 @@ def exo(cmd, shell=False):
     global opt
     logcmd(cmd)
     if not opt.dry_run:
-        return check_output(cmd, shell=shell)
+        return readpipe(cmd, shell=shell)
 
 
 handle_ctrl_c()