Created
November 2, 2012 15:51
-
-
Save lt/4002185 to your computer and use it in GitHub Desktop.
gzip new or modified files in the "static" directory.
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 | |
for file in $(find static -type f ! -name *.gz); do | |
if [ ! -e $file.gz ] || [ $file -nt $file.gz ]; then | |
gzip -9 -n -c -v $file > $file.gz | |
touch $file.gz -r $file | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment