Allow single file resources.
authorCameron McCormack <cam@mcc.id.au>
Sat, 06 Apr 2013 16:36:59 +1100
changeset 75 499d59804682
parent 74 f14102592e40
child 76 cf60bdf06b8d
Allow single file resources.
build.py
--- a/build.py	Sat Apr 06 13:15:48 2013 +1100
+++ b/build.py	Sat Apr 06 16:36:59 2013 +1100
@@ -195,7 +195,10 @@
   if os.path.exists(tocopypath):
     copyto = os.path.join(publish_dir,os.path.basename(tocopypath))
     shutil.rmtree(copyto, ignore_errors=True)
-    shutil.copytree(tocopypath, copyto)
+    if os.path.isdir(tocopypath):
+      shutil.copytree(tocopypath, copyto)
+    else:
+      shutil.copyfile(tocopypath, copyto)
 
 # Done: