]> arthur.barton.de Git - bup.git/blobdiff - cmd/damage-cmd.py
rm-cmd: add the bup-python #! preamble
[bup.git] / cmd / damage-cmd.py
index 6f630fd130ca3e4f9318b7e4ad90b0e61004c430..669148ad565a17ec9c5da168459bb8d4d72eec56 100755 (executable)
@@ -1,7 +1,14 @@
-#!/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, random
+
 from bup import options
-from bup.helpers import *
+from bup.helpers import log
 
 
 def randblock(n):
@@ -21,7 +28,7 @@ percent= maximum size of each damaged block (as a percent of entire file)
 equal    spread damage evenly throughout the file
 S,seed=  random number seed (for repeatable tests)
 """
-o = options.Options('bup damage', optspec)
+o = options.Options(optspec)
 (opt, flags, extra) = o.parse(sys.argv[1:])
 
 if not extra: