aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/ermacs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ermacs')
-rwxr-xr-xbin/ermacs26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/ermacs b/bin/ermacs
new file mode 100755
index 0000000..8ade916
--- /dev/null
+++ b/bin/ermacs
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+START_CWD=`pwd -P`
+
+SCRIPT=$0
+cd `dirname $SCRIPT`
+SCRIPT=`basename $SCRIPT`
+# Iterate down a (possible) chain of symlinks
+while [ -L "$SCRIPT" ]; do
+ SCRIPT=`readlink $SCRIPT`
+ cd `dirname $SCRIPT`
+ SCRIPT=`basename $SCRIPT`
+done
+
+PHYS_DIR=`pwd -P`
+EBIN="$PHYS_DIR/../ebin"
+MODS_EBIN="$PHYS_DIR/../mods/ebin"
+
+cd $START_CWD
+
+${ERL-erl} erl -pa ${EBIN}/ebin -pa ${MODS_EBIN} -noinput -noshell -nouser \
+ -run edit start $* \
+ 2>/tmp/ermacs-misc.log
+
+# How do I get sh to run this in response to SIGINT?
+stty sane