fix: reverse quotes for variable expansion

Without reversing quotes, the variables are sometimes improperly expanded, resulting in files not being removed.
This commit is contained in:
Jose Diaz-Gonzalez
2019-05-20 17:56:50 -07:00
parent 0087296bd3
commit da4361583b
12 changed files with 14 additions and 14 deletions

View File

@@ -11,7 +11,7 @@ add_keys() {
declare NAME="$1" KEY_FILE="$2"
local TMP_KEY_FILE
TMP_KEY_FILE=$(mktemp "/tmp/${FUNCNAME[0]}.XXXX")
trap 'rm -rf "$TMP_KEY_FILE" >/dev/null' RETURN INT TERM EXIT
trap "rm -rf '$TMP_KEY_FILE' >/dev/null" RETURN INT TERM EXIT
if [[ -n "$KEY_FILE" ]]; then
true