LDAPAccountManager/lam-packaging/debian/minify

20 lines
403 B
Plaintext
Raw Permalink Normal View History

2014-03-08 13:37:43 +00:00
#!/bin/bash
set -e
dir="templates/lib"
files=`ls $dir/*.js`
for file in $files; do
# skip dropmenu file, incompatible with YUI compressor
if [[ $file =~ .*dropmenu.* ]]; then
continue
fi
yui-compressor --nomunge --preserve-semi --disable-optimizations --charset UTF-8 -o ${file}-MIN $file
rm $file
mv ${file}-MIN $file
# add final new line to supress Debian warnings
echo "" >> $file
done