This is an automated email from the ASF dual-hosted git repository. markd pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/main by this push: new e71f88b [MINOR] Run script bug fixes: e71f88b is described below commit e71f88beca9e76a97d0651ff7fefaf949633a20a Author: Mark Dokter <m...@dokter.cc> AuthorDate: Thu Nov 11 18:23:57 2021 +0100 [MINOR] Run script bug fixes: * Move the setting of SYSTEMDS_ROOT before its first use * Search for a config xml file name that is actually included in the bin release Closes #1456 --- bin/systemds | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/bin/systemds b/bin/systemds index b74f22a..707f7e5 100755 --- a/bin/systemds +++ b/bin/systemds @@ -55,6 +55,14 @@ print_out() fi } +if [[ -z $SYSTEMDS_ROOT ]] ; then + SYSTEMDS_ROOT=. + print_out "SYSTEMDS_ROOT not set defaulting to current dir $(pwd)" +else + # construct a relative path + SYSTEMDS_ROOT=$(realpath --relative-to=. ${SYSTEMDS_ROOT}) +fi; + # when using find, look in the directories in this order DIR_SEARCH_ORDER=". $SYSTEMDS_ROOT $SYSTEMDS_ROOT/conf $SYSTEMDS_ROOT/lib $SYSTEMDS_ROOT/src $SYSTEMDS_ROOT/target" ordered_find() { @@ -264,13 +272,6 @@ if [ -z "$WORKER" ] ; then WORKER=0 fi -if [[ -z $SYSTEMDS_ROOT ]] ; then - SYSTEMDS_ROOT=. - print_out "SYSTEMDS_ROOT not set defaulting to current dir $(pwd)" -else - # construct a relative path - SYSTEMDS_ROOT=$(realpath --relative-to=. ${SYSTEMDS_ROOT}) -fi; # find me a SystemDS jar file to run if [ -z "$SYSTEMDS_JAR_FILE" ];then @@ -321,6 +322,9 @@ elif [ -z "$CONFIG_FILE" ] ; then # same as above: set config file param if the file exists CONFIG_FILE=$(ordered_find "SystemDS-config-defaults.xml") if [ -z "$CONFIG_FILE" ]; then + CONFIG_FILE=$(ordered_find "SystemDS-config.xml") + fi + if [ -z "$CONFIG_FILE" ]; then CONFIG_FILE="" else CONFIG_FILE="-config $CONFIG_FILE"