Skip to content

Commit

Permalink
FIX #702, pass arguments loaded from script conf file
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelkaczor committed Nov 29, 2015
1 parent 6548810 commit a037519
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -27,10 +27,21 @@ realpath () {
)
}

# Loads a configuration file full of default command line options for this script.
loadConfigFile() {
cat "$1" | sed '/^\#/d'
}


real_script_path="$(realpath "$0")"
app_home="$(realpath "$(dirname "$real_script_path")")"
lib_dir="$(realpath "${app_home}/../lib")"

${{template_declares}}

java -classpath $app_classpath $app_mainclass $@
# if configuration files exist, prepend their contents to $@ so it can be processed by this runner
[ -f "$script_conf_file" ] && set -- $(loadConfigFile "$script_conf_file") "$@"

java -classpath $app_classpath "$@" $app_mainclass


0 comments on commit a037519

Please sign in to comment.