Created
June 20, 2012 21:22
-
-
Save eveevans/2962310 to your computer and use it in GitHub Desktop.
download, compile and put jsmin in the path, mode of use: jsmin < application.js >application.min.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TEMP_DIR="/tmp/jsmin" | |
SRC_FILENAME="http://www.crockford.com/javascript/jsmin.c" | |
SRC_BASENAME="jsmin.c" | |
BIN_BASENAME="jsmin" | |
BIN_DIR="/bin" | |
mkdir $TEMP_DIR | |
cd $TEMP_DIR | |
curl --output $SRC_BASENAME $SRC_FILENAME | |
gcc $SRC_BASENAME -o $BIN_BASENAME | |
cp $BIN_BASENAME $BIN_DIR && echo "$BIN_BASENAME copied to $BIN_DIR" | |
cd - | |
rm -rf $TEMP_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment