Commits

razzmataz committed 20f4195 Merge

merged clone-dir...

Comments (0)

Files changed (1)

utils/clone-dir.py

+#!/usr/bin/env python
+
+import shutil
+import sys
+
+def usage():
+    print "usage: %s srcdir destdir" % sys.argv[0]
+
+# this is a crappy way of handling arguments/parameters
+if sys.argv[1] == '-h':
+    usage()
+    sys.exit(0)
+elif len(sys.argv) != 3:
+    usage()
+    print "sys.argv is %s" % len(sys.argv)
+    print "quitting"
+    sys.exit(1)
+
+try:
+    shutil.copytree(sys.argv[1], sys.argv[2])
+except Exception, e:
+    print "problem copying %s to %s :\n%s" % (sys.argv[1],sys.argv[2],e)