X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cmd%2Finit-cmd.py;h=412ecec1907e2f8b655acc356f1059b4d757419c;hb=c40b3dd5fd74e72024fbaad3daf5a958aefa1c54;hp=2e4a1513b99c058a1fec43ba0e62091d3ed2158d;hpb=581e9dff93565d57d777ac3a2b93c09844c7263b;p=bup.git diff --git a/cmd/init-cmd.py b/cmd/init-cmd.py index 2e4a151..412ecec 100755 --- a/cmd/init-cmd.py +++ b/cmd/init-cmd.py @@ -1,8 +1,15 @@ -#!/usr/bin/env python +#!/bin/sh +"""": # -*-python-*- +bup_python="$(dirname "$0")/bup-python" || exit $? +exec "$bup_python" "$0" ${1+"$@"} +""" +# end of bup preamble + +from __future__ import absolute_import import sys from bup import git, options, client -from bup.helpers import * +from bup.helpers import log, saved_errors optspec = """ @@ -19,7 +26,7 @@ if extra: try: git.init_repo() # local repo -except git.GitError, e: +except git.GitError as e: log("bup: error: could not init repository: %s" % e) sys.exit(1)