From 2d54c3a67ca735d482af5fa2dae9f2b8b4f1235a Mon Sep 17 00:00:00 2001 From: Aiko Mastboom Date: Tue, 7 May 2013 23:48:26 +0200 Subject: [PATCH] add ARM support --- installit | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/installit b/installit index b6a7091..459a0d1 100755 --- a/installit +++ b/installit @@ -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