1
0
mirror of /repos/Prototyper.git synced 2025-12-30 06:31:32 +01:00

add ARM support

This commit is contained in:
Aiko Mastboom 2013-05-07 23:48:26 +02:00
parent 37c1a0c994
commit 2d54c3a67c

View File

@ -7,15 +7,23 @@ set -e
current_dir=$(cd $(dirname $0) && pwd)
cd ${current_dir}
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
unameStr=`uname`
if [[ "${unameStr}" == 'Linux' ]]; then
SED='sed -i_orig '
CURL='wget '
elif [[ "$unamestr" == 'Darwin' ]]; then
elif [[ "${unameStr}" == 'Darwin' ]]; then
SED='sed -i _orig'
CURL='curl -O '
fi
arch=`uname -m`
if [[ "${arch}" == 'armv6l' ]]; then
# ARM support: https://github.com/mongodb/js-bson/issues/37
rm -rf ./node_modules/bson/build
${SED} -d s/#define USE_MISALIGNED_MEMORY_ACCESS 1/#define USE_MISALIGNED_MEMORY_ACCESS 0/g ./node_modules/bson/ext/bson.h
npm install bson
fi
# patch ShareJS client
if [ ! -f ./node_modules/share/webclient/share.js_orig ]; then
${SED} -e s/removeListener/removeEventListener/g ./node_modules/share/webclient/ace.js