phpmyadmin/scripts/compress-js
2012-09-24 14:20:55 +02:00

20 lines
425 B
Bash
Executable File

#!/bin/sh
set -e
if [ "x$1" = "x-v" -o "x$1" = "x--verbose" ] ; then
VERBOSE="--verbose"
else
VERBOSE=""
fi
for file in `find js -name '*.js' -not -name '*min.js'` ; do
mkdir -p sources/`dirname $file`
if [ ! -z "$VERBOSE" ] ; then
echo "Compressing $file ..."
fi
yui-compressor --charset utf-8 $VERBOSE --type js $file > $file.tmp
cp -a $file sources/$file
mv $file.tmp $file
done