From 4b31658af643d1884c0d464959243174d27b6f1f Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Sun, 3 Apr 2016 05:17:12 +0200 Subject: Allow running install.sh from the top-level directory. Setting CDIR to the directory containing install.sh makes it possible to run it as install/install.sh from the top-level directory. Calling readlink -f on it makes sure one gets the canonical location, so that cd-ing to various places doesn't interfere with finding appropriate files (relatively to CDIR) afterwards. --- install/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install') diff --git a/install/install.sh b/install/install.sh index 92d0684c6..e90dc902a 100755 --- a/install/install.sh +++ b/install/install.sh @@ -89,7 +89,7 @@ fi DB_NAME='ishtar'$APP_NAME INSTALL_PATH=$INSTALL_PREFIX$DB_NAME DATE=`date +%F` -CDIR=`pwd` +CDIR=`readlink -f $(dirname $0)` SECRET_KEY=`apg -a 0 -M ncl -n 6 -x 10 -m 40 |head -n 1` if [ $DB_HOST = '127.0.0.1' ] -- cgit v1.2.3