allow release if yui-compressor is called yuicompressor
authorArno Renevier <arno@renevier.net>
Sat, 18 Feb 2012 18:17:27 +0000 (19:17 +0100)
committerArno Renevier <arno@renevier.net>
Sat, 18 Feb 2012 18:18:18 +0000 (19:18 +0100)
scripts/release.py

index 9a1b4d2..3c5ded2 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())