view 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
line wrap: on
line source
#!/bin/bash
getSsdtHomeDir() {
     SOURCE="${BASH_SOURCE[0]}"
     while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
     echo $( cd $( dirname $SOURCE) && pwd )
}

echo ${BASH_SOURCE[*]}
export SSDT_HOME=$(getSsdtHomeDir)
export SSDT_SCRIPTS=${SSDT_HOME}/scripts
echo "ssdt_home $SSDT_HOME   ($SSDT_SCRIPTS)"
source "${SSDT_SCRIPTS}/.functions.sh"
alias utils='docker run -it -v ${PWD}:/tmp -v $SSDT_HOME:/ssdt --rm docker.ssdt.io/ssdt-utils'
alias send2ssdt='${SSDT_SCRIPTS}/send.sh'