LDAPAccountManager/lam-packaging/debian/minify

20 lines
403 B
Plaintext
Raw Normal View History

2014-06-12 17:21:14 +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