From 8df63aae42c40ac0413ccfacc3b2e8eb72e00a15 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 4 Dec 2020 01:13:01 -0400 Subject: Re-named old luxc-jvm to lux-bootstrapper. --- shell/lux.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 shell/lux.sh (limited to 'shell') diff --git a/shell/lux.sh b/shell/lux.sh new file mode 100755 index 000000000..3ff27a556 --- /dev/null +++ b/shell/lux.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +home() { + # Find out where the script is located. + # This is because it is assumed that the Aedifex JAR will be in the same directory. + local SCRIPT_SOURCE="${BASH_SOURCE[0]}" + while [ -h "$SCRIPT_SOURCE" ]; do + # resolve $SCRIPT_SOURCE until the file is no longer a symlink + local SCRIPT_HOME="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" >/dev/null 2>&1 && pwd )" + SCRIPT_SOURCE="$(readlink "$SCRIPT_SOURCE")" + # if $SCRIPT_SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located + [[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE="$SCRIPT_HOME/$SCRIPT_SOURCE" + done + echo "$( cd -P "$( dirname "$SCRIPT_SOURCE" )" >/dev/null 2>&1 && pwd )" +} + +aedifex() { + echo "$(home)/aedifex.jar" +} + +command() { + local COMMAND="" + while [ $# -gt 0 ]; do + COMMAND="$COMMAND $1" + shift + done + echo $COMMAND +} + +java -jar $(aedifex) $(command "$@") + -- cgit v1.2.3