diff options
author | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2011-06-30 18:06:07 +0100 |
---|---|---|
committer | Peter 'Pita' Martischka <petermartischka@googlemail.com> | 2011-06-30 18:06:07 +0100 |
commit | 95b47b4940d63e2b97747a79d47ee2fe5345173b (patch) | |
tree | 5f62c310a28eb67c8d3226d1407f3156cc32cdd8 /bin | |
parent | c98db5a4c11ce4ba1eee2dd69c1c1d87f3c1b981 (diff) | |
download | etherpad-lite-95b47b4940d63e2b97747a79d47ee2fe5345173b.zip |
use a downloaded jQuery instead of using googles CDN, and fixed btw a bug that let pad.js fails randomly
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/run.sh | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -37,6 +37,21 @@ fi echo "Ensure that all dependencies are up to date..." npm install +echo "Ensure jQuery is downloaded and up to date..." +DOWNLOAD_JQUERY="true" +NEEDED_VERSION="1.6.1" +if [ -f "static/js/jquery.min.js" ]; then + VERSION=$(cat static/js/jquery.min.js | head -n 2 | tail -n 1 | grep -o "v[0-9]*\.[0-9]*\.[0-9]*"); + + if [[ ${VERSION:1} = $NEEDED_VERSION ]]; then + DOWNLOAD_JQUERY="false" + fi +fi + +if [[ $DOWNLOAD_JQUERY = "true" ]]; then + wget -O static/js/jquery.min.js http://code.jquery.com/jquery-$NEEDED_VERSION.min.js +fi + #Remove all minified data to force node creating it new echo "Clear minfified cache..." rm var/minified* 2> /dev/null |