Changeset 823
- Timestamp:
- 05/01/07 22:24:47 (6 years ago)
- Files:
-
- 1 modified
-
trunk/contrib/compress.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/contrib/compress.php
r746 r823 1 1 <? 2 die("Run this script to batch-compress the current Xinha snapshot. To run the script, open the file and uncomment the die() command");2 die("Run this script to batch-compress the current Xinha snapshot. To run the script, open the file and comment out the die() command"); 3 3 4 4 error_reporting(E_ALL); … … 56 56 copy($file,$file."_uncompr.js"); 57 57 exec("java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js > $file 2>&1"); 58 unlink($file."_uncompr.js"); 58 if (preg_match('/js: ".*?", line \d+:/',file_get_contents($file))) 59 { 60 unlink($file); 61 rename($file."_uncompr.js",$file); 62 } 63 else 64 { 65 unlink($file."_uncompr.js"); 66 } 59 67 } 60 68 print "Operation complete."
