comparison init.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 source "$( dirname "${BASH_SOURCE[0]}")/scripts/.functions.sh" 2 getSsdtHomeDir() {
3 SOURCE="${BASH_SOURCE[0]}"
4 while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
5 echo $( cd $( dirname $SOURCE) && pwd )
6 }
7
8 echo ${BASH_SOURCE[*]}
9 export SSDT_HOME=$(getSsdtHomeDir)
10 export SSDT_SCRIPTS=${SSDT_HOME}/scripts
11 echo "ssdt_home $SSDT_HOME ($SSDT_SCRIPTS)"
12 source "${SSDT_SCRIPTS}/.functions.sh"
3 alias utils='docker run -it -v ${PWD}:/tmp -v $SSDT_HOME:/ssdt --rm docker.ssdt.io/ssdt-utils' 13 alias utils='docker run -it -v ${PWD}:/tmp -v $SSDT_HOME:/ssdt --rm docker.ssdt.io/ssdt-utils'
4 alias send2ssdt='/ssdt/scripts/send.sh' 14 alias send2ssdt='${SSDT_SCRIPTS}/send.sh'
5
6 export PATH=$PATH:$SSDT_HOME/scripts