This is an automated email from the ASF dual-hosted git repository.
markd pushed a commit to branch branch-2.2.0
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/branch-2.2.0 by this push:
new 3018f7a [MINOR] Run script bug fixes:
3018f7a is described below
commit 3018f7acaac4990a29298e045caffaf04595472c
Author: Mark Dokter <[email protected]>
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"