]> arthur.barton.de Git - bup.git/blobdiff - cmd/ftp-cmd.py
configure-version: completely handle _version.py
[bup.git] / cmd / ftp-cmd.py
index 6c40dc37bc3bc87e52449d8fb21dcbfa74bf933d..19352668ab28a42e9a0fddd4dcac28d62f2d8121 100755 (executable)
@@ -1,4 +1,9 @@
-#!/usr/bin/env python
+#!/bin/sh
+"""": # -*-python-*-
+bup_python="$(dirname "$0")/bup-python" || exit $?
+exec "$bup_python" "$0" ${1+"$@"}
+"""
+# end of bup preamble
 import sys, os, stat, fnmatch
 from bup import options, git, shquote, vfs, ls
 from bup.helpers import *
@@ -144,7 +149,7 @@ else:
     if readline:
         readline.set_completer_delims(' \t\n\r/')
         readline.set_completer(completer)
-        if platform.system() == 'Darwin':
+        if sys.platform.startswith('darwin'):
             # MacOS uses a slighly incompatible clone of libreadline
             readline.parse_and_bind('bind ^I rl_complete')
         readline.parse_and_bind('tab: complete')