diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2019-09-04 13:30:35 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2019-09-04 13:30:35 +0000 |
commit | 1e333d6ee30b142be63f589d9a5d32bbc471b6fb (patch) | |
tree | 6832b4bb5c50dad210614fb1663a9d6a29bf8219 | |
parent | d71937c4f9f3c7b69d6d39cbac1ccdce23df3abe (diff) |
update shell bootstrap sections
48 files changed, 193 insertions, 1 deletions
diff --git a/application-preprocessor/src/main/sh/vespa-preprocess-application b/application-preprocessor/src/main/sh/vespa-preprocess-application index 40742461d81..42e08411fe9 100644 --- a/application-preprocessor/src/main/sh/vespa-preprocess-application +++ b/application-preprocessor/src/main/sh/vespa-preprocess-application @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/clustercontroller-standalone/src/main/sh/fleetcontroller-start b/clustercontroller-standalone/src/main/sh/fleetcontroller-start index 85cf698148e..162179c6932 100755 --- a/clustercontroller-standalone/src/main/sh/fleetcontroller-start +++ b/clustercontroller-standalone/src/main/sh/fleetcontroller-start @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/config-model/src/main/sh/vespa-validate-application b/config-model/src/main/sh/vespa-validate-application index ba126542289..59891706068 100755 --- a/config-model/src/main/sh/vespa-validate-application +++ b/config-model/src/main/sh/vespa-validate-application @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/config-proxy/src/main/sh/vespa-config-ctl.sh b/config-proxy/src/main/sh/vespa-config-ctl.sh index 28efd808728..a17f0abed92 100755 --- a/config-proxy/src/main/sh/vespa-config-ctl.sh +++ b/config-proxy/src/main/sh/vespa-config-ctl.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/config-proxy/src/main/sh/vespa-config-loadtester.sh b/config-proxy/src/main/sh/vespa-config-loadtester.sh index 47a2b88872c..f7cecbf292f 100644 --- a/config-proxy/src/main/sh/vespa-config-loadtester.sh +++ b/config-proxy/src/main/sh/vespa-config-loadtester.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/config-proxy/src/main/sh/vespa-config-verification.sh b/config-proxy/src/main/sh/vespa-config-verification.sh index 58c759c9466..308d7f733a4 100644 --- a/config-proxy/src/main/sh/vespa-config-verification.sh +++ b/config-proxy/src/main/sh/vespa-config-verification.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/config/src/apps/vespa-activate-application/vespa-activate-application.sh b/config/src/apps/vespa-activate-application/vespa-activate-application.sh index b102f4077b1..ca0bc0a50ba 100644 --- a/config/src/apps/vespa-activate-application/vespa-activate-application.sh +++ b/config/src/apps/vespa-activate-application/vespa-activate-application.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/configserver/src/main/sh/start-configserver b/configserver/src/main/sh/start-configserver index 12683b1856a..4849b993340 100755 --- a/configserver/src/main/sh/start-configserver +++ b/configserver/src/main/sh/start-configserver @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/configserver/src/main/sh/start-logd b/configserver/src/main/sh/start-logd index df5f6b00209..d8ed068537e 100644 --- a/configserver/src/main/sh/start-logd +++ b/configserver/src/main/sh/start-logd @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/configserver/src/main/sh/stop-configserver b/configserver/src/main/sh/stop-configserver index 099429eb556..007ff7cdd62 100755 --- a/configserver/src/main/sh/stop-configserver +++ b/configserver/src/main/sh/stop-configserver @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/configserver/src/main/sh/vespa-configserver-remove-state b/configserver/src/main/sh/vespa-configserver-remove-state index c5cee479388..4ac32f86a05 100755 --- a/configserver/src/main/sh/vespa-configserver-remove-state +++ b/configserver/src/main/sh/vespa-configserver-remove-state @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/container-core/src/main/sh/vespa-load-balancer-status b/container-core/src/main/sh/vespa-load-balancer-status index e93337333f3..d7383c1614c 100755 --- a/container-core/src/main/sh/vespa-load-balancer-status +++ b/container-core/src/main/sh/vespa-load-balancer-status @@ -9,6 +9,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/container-search/src/main/sh/invoke b/container-search/src/main/sh/invoke index 0e5c281e72b..e0c162036c5 100755 --- a/container-search/src/main/sh/invoke +++ b/container-search/src/main/sh/invoke @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/filedistribution/src/main/sh/vespa-status-filedistribution.sh b/filedistribution/src/main/sh/vespa-status-filedistribution.sh index 941319b1b4b..34e26889339 100644 --- a/filedistribution/src/main/sh/vespa-status-filedistribution.sh +++ b/filedistribution/src/main/sh/vespa-status-filedistribution.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/logserver/bin/logserver-start.sh b/logserver/bin/logserver-start.sh index b1082ddc6a7..fd06f886edb 100755 --- a/logserver/bin/logserver-start.sh +++ b/logserver/bin/logserver-start.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/node-admin/src/main/sh/node-admin.sh b/node-admin/src/main/sh/node-admin.sh index 10e7e3c5ef6..c87c57d0a40 100755 --- a/node-admin/src/main/sh/node-admin.sh +++ b/node-admin/src/main/sh/node-admin.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh b/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh index 0ed35588e22..fa36566b01d 100755 --- a/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh +++ b/searchcore/src/apps/vespa-remove-indexes/vespa-remove-index.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/searchlib/src/main/sh/vespa-gbdt-converter b/searchlib/src/main/sh/vespa-gbdt-converter index 19a53408ab5..defa942922e 100755 --- a/searchlib/src/main/sh/vespa-gbdt-converter +++ b/searchlib/src/main/sh/vespa-gbdt-converter @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/searchlib/src/main/sh/vespa-treenet-converter b/searchlib/src/main/sh/vespa-treenet-converter index 03fabf8f5f4..eda5189e28f 100755 --- a/searchlib/src/main/sh/vespa-treenet-converter +++ b/searchlib/src/main/sh/vespa-treenet-converter @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/security-tools/src/main/sh/vespa-curl-wrapper b/security-tools/src/main/sh/vespa-curl-wrapper index 4c616b0fc4e..e286e121f64 100755 --- a/security-tools/src/main/sh/vespa-curl-wrapper +++ b/security-tools/src/main/sh/vespa-curl-wrapper @@ -11,6 +11,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/security-tools/src/main/sh/vespa-security-env b/security-tools/src/main/sh/vespa-security-env index 63d71920f99..4bebd797172 100755 --- a/security-tools/src/main/sh/vespa-security-env +++ b/security-tools/src/main/sh/vespa-security-env @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi @@ -70,4 +74,3 @@ findhost # END environment bootstrap section -exec java -Djava.awt.headless=true -cp ${VESPA_HOME}/lib/jars/security-tools-jar-with-dependencies.jar com.yahoo.vespa.security.tool.securityenv.Main "$@"
\ No newline at end of file diff --git a/standalone-container/src/main/sh/standalone-container.sh b/standalone-container/src/main/sh/standalone-container.sh index e5be27bb088..b49744ebe49 100755 --- a/standalone-container/src/main/sh/standalone-container.sh +++ b/standalone-container/src/main/sh/standalone-container.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespa_feed_perf/src/main/sh/vespa-feed-perf b/vespa_feed_perf/src/main/sh/vespa-feed-perf index 25340de25ec..466cd2ee98c 100755 --- a/vespa_feed_perf/src/main/sh/vespa-feed-perf +++ b/vespa_feed_perf/src/main/sh/vespa-feed-perf @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/rhel-prestart.sh b/vespabase/src/rhel-prestart.sh index 44bf4fd9205..3a770cdd785 100755 --- a/vespabase/src/rhel-prestart.sh +++ b/vespabase/src/rhel-prestart.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi @@ -66,6 +70,7 @@ findhost () { } findroot +findhost # END environment bootstrap section diff --git a/vespabase/src/start-cbinaries.sh b/vespabase/src/start-cbinaries.sh index 02eac2f42bc..f17829aa081 100755 --- a/vespabase/src/start-cbinaries.sh +++ b/vespabase/src/start-cbinaries.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/start-tool.sh b/vespabase/src/start-tool.sh index f3100739cde..b3811939ad7 100755 --- a/vespabase/src/start-tool.sh +++ b/vespabase/src/start-tool.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/start-vespa-base.sh b/vespabase/src/start-vespa-base.sh index a346854134d..fdda5f85198 100755 --- a/vespabase/src/start-vespa-base.sh +++ b/vespabase/src/start-vespa-base.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/stop-vespa-base.sh b/vespabase/src/stop-vespa-base.sh index 4e14b51c869..f30faad65ee 100755 --- a/vespabase/src/stop-vespa-base.sh +++ b/vespabase/src/stop-vespa-base.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/vespa-start-configserver.sh b/vespabase/src/vespa-start-configserver.sh index 3a7416c5162..d6f401ad5d0 100755 --- a/vespabase/src/vespa-start-configserver.sh +++ b/vespabase/src/vespa-start-configserver.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/vespa-start-services.sh b/vespabase/src/vespa-start-services.sh index ef8a6b55f05..42a98511258 100755 --- a/vespabase/src/vespa-start-services.sh +++ b/vespabase/src/vespa-start-services.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/vespa-stop-configserver.sh b/vespabase/src/vespa-stop-configserver.sh index a0c3ca7169b..116c1f14617 100755 --- a/vespabase/src/vespa-stop-configserver.sh +++ b/vespabase/src/vespa-stop-configserver.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespabase/src/vespa-stop-services.sh b/vespabase/src/vespa-stop-services.sh index 0f1fcd30abe..441717c2a71 100755 --- a/vespabase/src/vespa-stop-services.sh +++ b/vespabase/src/vespa-stop-services.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-destination.sh b/vespaclient-java/src/main/sh/vespa-destination.sh index 8ea2d1ca63f..5400f15e67a 100755 --- a/vespaclient-java/src/main/sh/vespa-destination.sh +++ b/vespaclient-java/src/main/sh/vespa-destination.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-document-statistics.sh b/vespaclient-java/src/main/sh/vespa-document-statistics.sh index ee72574fbc7..c27aae1d0f2 100755 --- a/vespaclient-java/src/main/sh/vespa-document-statistics.sh +++ b/vespaclient-java/src/main/sh/vespa-document-statistics.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-feeder.sh b/vespaclient-java/src/main/sh/vespa-feeder.sh index 557a72c1da5..2e856034295 100755 --- a/vespaclient-java/src/main/sh/vespa-feeder.sh +++ b/vespaclient-java/src/main/sh/vespa-feeder.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-get.sh b/vespaclient-java/src/main/sh/vespa-get.sh index 7c6082f3858..da4f8694d29 100644 --- a/vespaclient-java/src/main/sh/vespa-get.sh +++ b/vespaclient-java/src/main/sh/vespa-get.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh b/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh index 281ce97009a..151ce6103d7 100755 --- a/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh +++ b/vespaclient-java/src/main/sh/vespa-query-profile-dump-tool.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-stat.sh b/vespaclient-java/src/main/sh/vespa-stat.sh index de57aece5e4..400d85263d3 100644 --- a/vespaclient-java/src/main/sh/vespa-stat.sh +++ b/vespaclient-java/src/main/sh/vespa-stat.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh b/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh index 3ef5dcd932e..0f48b1659af 100755 --- a/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh +++ b/vespaclient-java/src/main/sh/vespa-summary-benchmark.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-visit-target.sh b/vespaclient-java/src/main/sh/vespa-visit-target.sh index d032ad86a54..416f3feac8c 100755 --- a/vespaclient-java/src/main/sh/vespa-visit-target.sh +++ b/vespaclient-java/src/main/sh/vespa-visit-target.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient-java/src/main/sh/vespa-visit.sh b/vespaclient-java/src/main/sh/vespa-visit.sh index 5d47a91ba38..34610fbbd8c 100755 --- a/vespaclient-java/src/main/sh/vespa-visit.sh +++ b/vespaclient-java/src/main/sh/vespa-visit.sh @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient/src/sh/vespa-get-cluster-state b/vespaclient/src/sh/vespa-get-cluster-state index d1b0482cf3a..2edaad47a21 100755 --- a/vespaclient/src/sh/vespa-get-cluster-state +++ b/vespaclient/src/sh/vespa-get-cluster-state @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient/src/sh/vespa-get-node-state b/vespaclient/src/sh/vespa-get-node-state index d6d5a6905cf..7d0d1e89289 100755 --- a/vespaclient/src/sh/vespa-get-node-state +++ b/vespaclient/src/sh/vespa-get-node-state @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/vespaclient/src/sh/vespa-set-node-state b/vespaclient/src/sh/vespa-set-node-state index 292ad8aef27..ffa09b318d6 100755 --- a/vespaclient/src/sh/vespa-set-node-state +++ b/vespaclient/src/sh/vespa-set-node-state @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/zkfacade/src/main/sh/vespa-zkcat b/zkfacade/src/main/sh/vespa-zkcat index ba8924b456f..e156fbb109e 100755 --- a/zkfacade/src/main/sh/vespa-zkcat +++ b/zkfacade/src/main/sh/vespa-zkcat @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/zkfacade/src/main/sh/vespa-zkcli b/zkfacade/src/main/sh/vespa-zkcli index 318836ec574..33807d15346 100755 --- a/zkfacade/src/main/sh/vespa-zkcli +++ b/zkfacade/src/main/sh/vespa-zkcli @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/zkfacade/src/main/sh/vespa-zkctl b/zkfacade/src/main/sh/vespa-zkctl index 43112abd925..88165a1ed38 100755 --- a/zkfacade/src/main/sh/vespa-zkctl +++ b/zkfacade/src/main/sh/vespa-zkctl @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi diff --git a/zkfacade/src/main/sh/vespa-zkls b/zkfacade/src/main/sh/vespa-zkls index 5ab1204cea8..c290d2ff3ac 100755 --- a/zkfacade/src/main/sh/vespa-zkls +++ b/zkfacade/src/main/sh/vespa-zkls @@ -8,6 +8,10 @@ findpath () { myname=${0} mypath=${myname%/*} myname=${myname##*/} + empty_if_start_slash=${mypath%%/*} + if [ "${empty_if_start_slash}" ]; then + mypath=$(pwd)/${mypath} + fi if [ "$mypath" ] && [ -d "$mypath" ]; then return fi |