diff options
author | Cyril Brulebois <cyril@debamax.com> | 2016-04-03 05:17:12 +0200 |
---|---|---|
committer | Cyril Brulebois <cyril@debamax.com> | 2016-04-03 05:32:05 +0200 |
commit | 4b31658af643d1884c0d464959243174d27b6f1f (patch) | |
tree | ad6b4079aee470c7d97501229d3a36510abc293f /install | |
parent | e3b9d81618fe784996c5941338f83855b9eb75ce (diff) | |
download | Ishtar-4b31658af643d1884c0d464959243174d27b6f1f.tar.bz2 Ishtar-4b31658af643d1884c0d464959243174d27b6f1f.zip |
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.
Diffstat (limited to 'install')
-rwxr-xr-x | install/install.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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' ] |