mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-26 02:16:16 -04:00
use a downloaded jQuery instead of using googles CDN, and fixed btw a bug that let pad.js fails randomly
This commit is contained in:
parent
c98db5a4c1
commit
95b47b4940
5 changed files with 21 additions and 6 deletions
15
bin/run.sh
15
bin/run.sh
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue