diff --git a/utils/lib_utils.sh b/utils/lib_utils.sh index cc7594e..6e3cb87 100644 --- a/utils/lib_utils.sh +++ b/utils/lib_utils.sh @@ -44,13 +44,13 @@ set -o nounset # Treat unset variables as an error function make_working_dir { # the directory of the script - DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + local DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # the temp directory used, within $DIR # omit the -p parameter to create a temporal directory in # the default location - WORK_DIR=`mktemp -d -p "$DIR"` + local WORK_DIR=`mktemp -d -p "$DIR"` # check if tmp dir was created if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then