Commit 6e7364b1 authored by Leo Iannacone's avatar Leo Iannacone

get jquery 1.11.0 as externa_libs

parent 2bf064e2
#!/bin/bash
TMP_DIR="`mktemp -d`"
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PUBLIC_DIR="${SCRIPTS_DIR}/../public/external_libs"
EXT_LIBS_DIR="${SCRIPTS_DIR}/../public/external_libs"
get_bootstrap() {
VERSION="3.1.1"
NAME="bootstrap-${VERSION}-dist"
if [ -d ${PUBLIC_DIR}/${NAME} ] ; then return ; fi
if [ -d ${EXT_LIBS_DIR}/${NAME} ] ; then return ; fi
ARCHIVE=${NAME}.zip
URL="https://github.com/twbs/bootstrap/releases/download/v${VERSION}/${ARCHIVE}"
cd $TMP_DIR
echo "Downloading bootstrap ..."
curl -s -O -L ${URL} &&
unzip -q ${ARCHIVE} && mv ${NAME} ${PUBLIC_DIR}
cd && rm -r $TMP_DIR
echo "Downloading bootstrap ${VERSION} ..."
curl -s -O -L ${URL} && \
unzip -q ${ARCHIVE} && rm ${ARCHIVE}
}
get_jquery() {
VERSION="1.11.0"
DIR_JQUERY="jquery"
if [ -d ${EXT_LIBS_DIR}/${DIR_JQUERY} ] ; then return ; fi
mkdir ${DIR_JQUERY}
cd ${DIR_JQUERY}
URL="http://code.jquery.com/jquery-${VERSION}.min.js"
echo "Downloading jquery ${VERSION} ..."
curl -s -O -L ${URL}
cd ..
}
mkdir -p ${PUBLIC_DIR}
if [ ! -d ${EXT_LIBS_DIR} ] ; then mkdir -p ${EXT_LIBS_DIR} ; fi
TMP_DIR="`mktemp -d`"
cd ${TMP_DIR}
get_jquery
get_bootstrap
if [ "`ls -1`" != "" ] ; then mv * ${EXT_LIBS_DIR} ; fi
cd && rm -r ${TMP_DIR}
\ No newline at end of file
......@@ -39,8 +39,8 @@
</div>
</footer>
<script src='//code.jquery.com/jquery-1.7.2.min.js'></script>
<script src='/socket.io/socket.io.js'></script>
<script src='/external_libs/jquery/jquery-1.11.0.min.js'></script>
<script src="/external_libs/bootstrap-3.1.1-dist/js/bootstrap.min.js"></script>
<script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment