plugin:ckgedit:compress.sh
This is an old revision of the document!
- any_compr.sh
#!/bin/sh IN=$1 if [ "$2" ] then OUT=$2 else BASENAME=` echo $1 | awk -F. '{ print $1 }' ` EXTENSION=` echo $1 | awk -F. '{ print $2 }' ` echo $BASENAME OUT="$BASENAME-cmpr.$EXTENSION" fi echo $OUT YUI=/usr/lib/jvm/yui/yuicompressor java -jar $YUI --type $EXTENSION $IN -o $OUT
This script will compress both .js and .css files.
Usage:
- any_compr.sh plugin_name.js.unc
if the script is in /usr/local/bin - ./any_compr.sh plugin_name.js.unc
if the script is in the same directory as the file to be compressed.
The result will be: plugin_name-cmpr.js or 1)
1)
or css_file-cmpr.css, if you care compressing a style sheet
plugin/ckgedit/compress.sh.1501178266.txt.gz · Last modified: 2017-07-27 19:57 by turnermm