1
0
mirror of /repos/Prototyper.git synced 2026-02-27 16:12:00 +01:00

added lib caching, deployit script

This commit is contained in:
Aiko Mastboom
2013-05-09 12:28:21 +02:00
parent a730a553fe
commit b81177b4a2
3 changed files with 49 additions and 34 deletions

View File

@@ -20,7 +20,6 @@ set +e
head ./node_modules/bson/ext/bson.h | grep "#define USE_MISALIGNED_MEMORY_ACCESS 1"
rebuild_bson=$?
set -e
echo rebuild_bson $rebuild_bson
arch=`uname -m`
if [[ "${arch}" == 'armv6l' && "${rebuild_bson}" == 0 ]]; then
# ARM support: https://github.com/mongodb/js-bson/issues/37
@@ -39,6 +38,12 @@ if [ ! -f ./node_modules/share/webclient/share.js_orig ]; then
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/share-ace.js
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/share.uncompressed.js
fi
if [[ -d ${HOME}/.prototyper-cache/lib && ! -d ./public/lib ]];then
mkdir -p ./public/lib
cp -r ${HOME}/.prototyper-cache/lib ./public
fi
# Knockout
mkdir -p ./public/lib/knockout
cd ./public/lib/knockout
@@ -138,6 +143,11 @@ if [ ! -f ./less-1.3.3.min.js ]; then
fi
cd ${current_dir}
if [ ! -d ${HOME}/.prototyper-cache/lib ];then
mkdir -p ${HOME}/.prototyper-cache
cp -r ./public/lib ${HOME}/.prototyper-cache
fi
if [[ "${arch}" == 'armv6l' && ! -d ./node_modules/bson/build ]]; then
echo "need to rebuild bson: 'npm rebuild bson' before running"
fi