Mercurial > public > ssdt-docker
diff init.sh @ 163:daf91a3bbee5 production v1.2.0
flow: Merged <release> 'v1.2.0' to <master> ('production').
author | smith@nwoca.org |
---|---|
date | Tue, 15 Aug 2017 21:59:23 +0100 |
parents | 249ec634da33 |
children | 9afc8cb478f6 |
line wrap: on
line diff
--- a/init.sh Fri Jun 16 17:14:15 2017 +0100 +++ b/init.sh Tue Aug 15 21:59:23 2017 +0100 @@ -1,3 +1,12 @@ #!/bin/bash -alias utils='docker run -it -v ${PWD}:/tmp -v /ssdt:/ssdt --rm docker.ssdt.io/ssdt-utils' -alias send2ssdt='/ssdt/scripts/send.sh' \ No newline at end of file +getSsdtHomeDir() { + SOURCE="${BASH_SOURCE[0]}" + while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done + echo $( cd $( dirname $SOURCE) && pwd ) +} + +export SSDT_HOME=$(getSsdtHomeDir) +export SSDT_SCRIPTS=${SSDT_HOME}/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'