]> dev.renevier.net Git - syj.git/blobdiff - scripts/release.py
build process raise an exception when install file contains an invalide filename
[syj.git] / scripts / release.py
index 9a1b4d2959fc65726bdf282827dc35bbcc6147e8..3b5c9ea5ae99cb3e017185d897ff457737019e47 100755 (executable)
@@ -30,7 +30,10 @@ def updateversion():
 
 def compress(path):
     tmpout = tempfile.TemporaryFile()
-    subprocess.Popen(['yui-compressor', path], stdout=tmpout).communicate()
+    try:
+        subprocess.Popen(['yui-compressor', path], stdout=tmpout).communicate()
+    except OSError:
+        subprocess.Popen(['yuicompressor', path], stdout=tmpout).communicate()
     tmpout.seek(0)
     with open(path, 'w') as output:
         output.write(tmpout.read())
@@ -92,8 +95,12 @@ def install(source, target):
         shutil.copy(source, buildtarget)
 
     else:
+        hascontent = False
         for item in glob.glob(source):
+            hascontent = True
             install(item, target)
+        if not hascontent: # not a directory or a file or a list of files
+            raise Exception(("%s does not exist" % source))
 
 def main():
     if os.path.isdir(__BUILD__):