Skip to content

Instantly share code, notes, and snippets.

@krestenkrab
Last active December 23, 2015 17:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save krestenkrab/6669941 to your computer and use it in GitHub Desktop.
Save krestenkrab/6669941 to your computer and use it in GitHub Desktop.
Making n2o/skyline work on MacOS X / R16B02

In addition to erlang R16B02, you need a more recent bash because the scripts use bash associative arrays; a feature which is not present in the version of bash distributed with MacOS X.

brew install node
brew install bash

## put new bash on path
export PATH=/usr/local/bin:$PATH
diff --git a/release.sh b/release.sh
index 0f0f717..f1de560 100755
--- a/release.sh
+++ b/release.sh
@@ -1,18 +1,15 @@
#!/usr/bin/env bash
NODE=${1:-"web"}
-ERLANG=/usr/lib/erlang
-if [ "$OSTYPE" == "FreeBSD" ] ; then
- ERLANG=/usr/local/lib/erlang
-fi
+ERLANG_LIB=$(erl -noshell -eval 'io:format("~s", [code:lib_dir()]).' -s erlang halt)
release_node() {
rm -rf rels/$1/node/lib
rm -rf rels/$1/node/log
rm -rf rels/$1/node/releases
(cd rels/$1; rebar -f generate)
- cp -R $ERLANG/lib/erl_interface-* rels/$1/node/lib/
+ cp -R $ERLANG_LIB/erl_interface-* rels/$1/node/lib/
install -d rels/$1/node/kai
}
diff --git a/rels/web/files/node b/rels/web/files/node
index 43d90bc..953c3bb 100755
--- a/rels/web/files/node
+++ b/rels/web/files/node
@@ -241,7 +241,7 @@ case "$1" in
BINDIR=$ROOTDIR/erts-$ERTS_VSN/bin
EMU=beam
PROGNAME=`echo $0 | sed 's/.*\\///'`
- CMD="$BINDIR/erlexec -boot $RUNNER_BASE_DIR/releases/$APP_VSN/$BOOTFILE -mode embedded -config $CONFIG_PATH -
+ CMD="$BINDIR/erlexec -boot $RUNNER_BASE_DIR/releases/$APP_VSN/$BOOTFILE -config $CONFIG_PATH -args_file $VMAR
export EMU
export ROOTDIR
export BINDIR
diff --git a/styles.sh b/styles.sh
index da14f6e..b023d4f 100755
--- a/styles.sh
+++ b/styles.sh
@@ -3,6 +3,6 @@
APPSTORE=apps/web/priv/static/appstore
CSS=apps/web/priv/static/css
-NODE_APP=/usr/bin/node
+NODE_APP=node
$NODE_APP apps/web/priv/static/less/bin/lessc -x $APPSTORE/appstore.less > $CSS/appstore.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment