comparison scripts/.functions.sh @ 143:c029be781d13

DEP-12: handle symlinks in home discovery
author smith@nwoca.org
date Wed, 05 Jul 2017 22:12:06 +0100
parents 8f45c43ea7a4
children 249ec634da33
comparison
equal deleted inserted replaced
142:923c2b21fac7 143:c029be781d13
1 #!/bin/bash 1 #!/bin/bash
2 export SSDT_SCRIPTS=$(dirname "${BASH_SOURCE[0]}") 2
3 export SSDT_HOME=$(dirname $SSDT_SCRIPTS) 3 getScriptDir() {
4 SOURCE="${BASH_SOURCE[0]}"
5 while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
6 echo $( cd $( dirname $SOURCE) && pwd )
7 }
8
9 if [ "$SSDT_HOME" == "" ]
10 then
11 export SSDT_SCRIPTS=$(getScriptDir)
12 export SSDT_HOME=$(dirname $SSDT_SCRIPTS)
13 fi
4 14
5 # deletes psql data from specified service 15 # deletes psql data from specified service
6 resetDbVolume() { 16 resetDbVolume() {
7 # Works for named and unnamed volumes and custom $PGDATA. 17 # Works for named and unnamed volumes and custom $PGDATA.
8 # Container must be stopped 18 # Container must be stopped