From a4f96bd3a352b61910b383b1505354357a462777 Mon Sep 17 00:00:00 2001 From: Maxim Antonov Date: Wed, 14 Dec 2016 12:53:02 +0300 Subject: [PATCH] fix small issue in solr shell script --- solr/bin/solr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/solr/bin/solr b/solr/bin/solr index c1add261bd01..0693d87ff238 100755 --- a/solr/bin/solr +++ b/solr/bin/solr @@ -73,6 +73,10 @@ while [ -h "$SOLR_SCRIPT" ] ; do fi done +# if you are using cdpath, almost all "cd somedir" command (if you don't use absolute path) print path where it go +# thus if SOLR_TIP is /home/user/solr, SOLR_TIP=`cd "$SOLR_TIP"; pwd` will return "/home/user/solr\n/home/user/solr" +# and you will see "file or directory not found" +CDPATH='' SOLR_TIP=`dirname "$SOLR_SCRIPT"`/.. SOLR_TIP=`cd "$SOLR_TIP"; pwd` DEFAULT_SERVER_DIR="$SOLR_TIP/server"