]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/damage-cmd.py
ftp: convert to internal command
[bup.git] / lib / cmd / damage-cmd.py
index c7c712a138bf05a537b314f3776a7dfc60947e9a..cc2fb77a89208989d895522be97a141c50c3708c 100755 (executable)
@@ -9,15 +9,18 @@ for arg in "$@"; do
     arg_i=$((arg_i + 1))
 done
 # Here to end of preamble replaced during install
-bup_python="$(dirname "$0")/bup-python" || exit $?
+bup_python="$(dirname "$0")/../../config/bin/python" || exit $?
 exec "$bup_python" "$0"
 """
 # end of bup preamble
 
 from __future__ import absolute_import
-import os, random, sys
 
-sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
+# Intentionally replace the dirname "$0" that python prepends
+import os, sys
+sys.path[0] = os.path.dirname(os.path.realpath(__file__)) + '/..'
+
+import random
 
 from bup import compat, options
 from bup.compat import argv_bytes, bytes_from_uint, range