mirror of
/repos/Prototyper.git
synced 2025-12-30 06:31:32 +01:00
proper bash
This commit is contained in:
parent
da439cf28f
commit
563f883917
@ -4,7 +4,7 @@ current_dir=$(cd $(dirname $0) && pwd)
|
||||
base_dir=${current_dir}/..
|
||||
cd ${base_dir}
|
||||
|
||||
if [ ! -x ./opt/node-jscoverage/jscoverage ]; then
|
||||
if [[ ! -x ./opt/node-jscoverage/jscoverage ]]; then
|
||||
mkdir -p ./opt
|
||||
cd ./opt
|
||||
git clone git://github.com/visionmedia/node-jscoverage.git
|
||||
@ -13,7 +13,7 @@ if [ ! -x ./opt/node-jscoverage/jscoverage ]; then
|
||||
cd ${base_dir}
|
||||
fi
|
||||
|
||||
if [ ! -x ./node_modules/.bin/mocha ]; then
|
||||
if [[ ! -x ./node_modules/.bin/mocha ]]; then
|
||||
npm install mocha
|
||||
fi
|
||||
|
||||
|
||||
@ -15,7 +15,8 @@ if [[ "${unameStr}" == 'Linux' ]]; then
|
||||
CURL='wget '
|
||||
elif [[ "${unameStr}" == 'Darwin' ]]; then
|
||||
SED='sed -i _orig'
|
||||
CURL='curl -O '
|
||||
CURL='curl -LO '
|
||||
CURLo='curl -L '
|
||||
fi
|
||||
|
||||
set +e
|
||||
@ -34,7 +35,7 @@ if [[ "${arch}" == 'armv6l' && "${rebuild_bson}" == 0 ]]; then
|
||||
fi
|
||||
|
||||
# patch ShareJS client
|
||||
if [ ! -f ./node_modules/share/webclient/share.js_orig ]; then
|
||||
if [[ ! -f ./node_modules/share/webclient/share.js_orig ]]; then
|
||||
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/ace.js
|
||||
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/share.js
|
||||
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/share-ace.js
|
||||
@ -46,7 +47,7 @@ if [[ -d ${HOME}/.prototyper-cache/lib && ! -d ./public/lib ]];then
|
||||
cp -r ${HOME}/.prototyper-cache/lib ./public
|
||||
fi
|
||||
|
||||
# Knockout
|
||||
echo "# Knockout"
|
||||
mkdir -p ./public/lib/knockout
|
||||
cd ./public/lib/knockout
|
||||
if [ ! -f ./knockout-min.js ]; then
|
||||
@ -83,13 +84,13 @@ if [ ! -f ./knockout-sortable.min.js ]; then
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
# Bootstrap
|
||||
echo "# Bootstrap"
|
||||
mkdir -p ./public/lib/bootstrap
|
||||
cd ./public/lib/bootstrap
|
||||
if [ ! -f ./bootstrap-combined.min.css ]; then
|
||||
if [[ ! -f ./bootstrap-combined.min.css ]]; then
|
||||
${CURL} http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css
|
||||
fi
|
||||
if [ ! -f ./bootstrap.min.js ]; then
|
||||
if [[ ! -f ./bootstrap.min.js ]]; then
|
||||
${CURL} http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js
|
||||
fi
|
||||
cd ${base_dir}
|
||||
@ -97,15 +98,16 @@ cd ${base_dir}
|
||||
# http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/img/glyphicons-halflings.png
|
||||
mkdir -p ./public/lib/img
|
||||
cd ./public/lib/img
|
||||
if [ ! -f ./glyphicons-halflings.png ]; then
|
||||
echo "# glyphicons-halflings"
|
||||
if [[ ! -f ./glyphicons-halflings.png ]]; then
|
||||
${CURL} http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/img/glyphicons-halflings.png
|
||||
fi
|
||||
if [ ! -f ./glyphicons-halflings-white.png ]; then
|
||||
if [[ ! -f ./glyphicons-halflings-white.png ]]; then
|
||||
${CURL} http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/img/glyphicons-halflings-white.png
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
# JQuery
|
||||
echo "# JQuery"
|
||||
mkdir -p ./public/lib/jquery
|
||||
cd ./public/lib/jquery
|
||||
if [ ! -f ./jquery.min.js ]; then
|
||||
@ -120,47 +122,60 @@ if [ ! -f ./jquery-ui.js ]; then
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
# SockJS
|
||||
echo "# SockJS"
|
||||
mkdir -p ./public/lib/sockjs
|
||||
cd ./public/lib/sockjs
|
||||
if [ ! -f ./sockjs-0.3.min.js ]; then
|
||||
${CURL} http://cdn.sockjs.org/sockjs-0.3.min.js
|
||||
if [[ ! -f ./sockjs-0.3.min.js ]]; then
|
||||
# ${CURL} http://cdn.sockjs.org/sockjs-0.3.min.js
|
||||
${CURL} https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.min.js
|
||||
fi
|
||||
if [[ ! -f ./sockjs-0.3.js ]]; then
|
||||
${CURL} https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.js
|
||||
fi
|
||||
if [[ ! -f ./sockjs-0.3.4.min.js ]]; then
|
||||
${CURL} https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.min.js
|
||||
fi
|
||||
if [[ ! -f ./sockjs-0.3.4.js ]]; then
|
||||
${CURL} https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.4.js
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
# Underscore
|
||||
echo "# Underscore"
|
||||
mkdir -p ./public/lib/underscore
|
||||
cd ./public/lib/underscore
|
||||
if [ ! -f ./underscore-min.js ]; then
|
||||
if [[ ! -f ./underscore-min.js ]]; then
|
||||
${CURL} http://underscorejs.org/underscore-min.js
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
# //cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js
|
||||
echo "# modernizr"
|
||||
mkdir -p ./public/lib/modernizr
|
||||
cd ./public/lib/modernizr
|
||||
if [ ! -f ./modernizr.min.js ]; then
|
||||
if [[ ! -f ./modernizr.min.js ]]; then
|
||||
${CURL} http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
# //netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css
|
||||
echo "# font-awesome"
|
||||
mkdir -p ./public/lib/font-awesome
|
||||
cd ./public/lib/font-awesome
|
||||
if [ ! -f ./font-awesome.css ]; then
|
||||
${CURL} http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css
|
||||
if [[ ! -f ./font-awesome.css ]]; then
|
||||
${CURL} https://stackpath.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
# https://raw.githubusercontent.com/less/less.js/v1.3.3/dist/less-1.3.3.min.js
|
||||
# https://raw.github.com/cloudhead/less.js/master/dist/less-1.3.3.min.js
|
||||
echo "# lessjs"
|
||||
mkdir -p ./public/lib/lessjs
|
||||
cd ./public/lib/lessjs
|
||||
if [ ! -f ./less-1.3.3.min.js ]; then
|
||||
${CURL} https://raw.githubusercontent.com/less/less.js/v1.3.3/dist/less-1.3.3.min.js
|
||||
if [[ ! -f ./less-1.3.3.min.js ]]; then
|
||||
${CURLo} https://cdnjs.cloudflare.com/ajax/libs/less.js/1.3.3/less.min.js -o less-1.3.3.min.js
|
||||
fi
|
||||
cd ${base_dir}
|
||||
|
||||
if [ ! -d ${HOME}/.prototyper-cache ];then
|
||||
if [[ ! -d ${HOME}/.prototyper-cache ]];then
|
||||
mkdir -p ${HOME}/.prototyper-cache
|
||||
fi
|
||||
cp -r ./public/lib ${HOME}/.prototyper-cache
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user