automatic prefixfree.js dl

This commit is contained in:
Robin 2012-02-04 18:37:36 +01:00
parent adc58cdcaf
commit eb24404d3d
2 changed files with 15 additions and 419 deletions

View file

@ -67,6 +67,21 @@ if [ $DOWNLOAD_JQUERY = "true" ]; then
curl -lo static/js/jquery.js http://code.jquery.com/jquery-$NEEDED_VERSION.js || exit 1
fi
echo "Ensure prefixfree is downloaded and up to date..."
DOWNLOAD_PREFIXFREE="true"
NEEDED_VERSION="1.0.4"
if [ -f "static/js/prefixfree.js" ]; then
VERSION=$(cat static/js/prefixfree.js | grep "PrefixFree" | grep -o "[0-9].[0-9].[0-9]");
if [ ${VERSION#v} = $NEEDED_VERSION ]; then
DOWNLOAD_PREFIXFREE="false"
fi
fi
if [ $DOWNLOAD_PREFIXFREE = "true" ]; then
curl -lo static/js/prefixfree.js https://raw.github.com/LeaVerou/prefixfree/master/prefixfree.min.js || exit 1
fi
#Remove all minified data to force node creating it new
echo "Clear minfified cache..."
rm -f var/minified*