Skip to content

Instantly share code, notes, and snippets.

@ashokgelal
Created June 16, 2020 15:19
Show Gist options
  • Save ashokgelal/c569e2df7e296378c8becce1c8680f31 to your computer and use it in GitHub Desktop.
Save ashokgelal/c569e2df7e296378c8becce1c8680f31 to your computer and use it in GitHub Desktop.
Alpas prod script
#!/usr/bin/env bash
runApp() {
MY_PATH=$(dirname "$0")
MY_PATH=$( (cd "$MY_PATH" && pwd))
APP_PATH="${MY_PATH}"
export alpas_run_mode="console"
export alpas_root_dir="$APP_PATH"
java -jar app.jar $*
unset alpas_run_mode
unset alpas_root_dir
}
if [[ $# -eq 1 ]]; then
case "$1" in
help)
runApp --help
;;
*)
runApp "$@"
;;
esac
else
runApp "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment