Put variables into local scope of the function
Forgot to use the local keyword when declaring the variables.
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user