Open tamalsaha opened 4 years ago
#!/bin/bash set -eou pipefail SCRIPT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..) SCRIPT_NAME=$(basename "${BASH_SOURCE[0]}") pushd $SCRIPT_ROOT # http://redsymbol.net/articles/bash-exit-traps/ function cleanup() { popd } trap cleanup EXIT