Created
May 29, 2012 07:51
-
-
Save danbettles/2823177 to your computer and use it in GitHub Desktop.
Building JSMin on Linux
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 |
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
jsmin <application.js >application.min.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment