Commit: 0a66d591490a277476fcb84f979b8b97bf1391f3
Parent: edd00851a18a3c5353b403ed376a77fd29cea01e
Author: Klemens Nanni
Date: Mon, 29 Feb 2016 09:06:50 +0100
No need for dirname
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tpm b/tpm
@@ -84,7 +84,7 @@ insert() {
[ -z "${password}" ] && abort "You didn't specify a password."
- mkdir -p "$(dirname "${STORE_DIR}"/"${1}".gpg)"
+ [ -d "${STORE_DIR}" ] || mkdir -p "${STORE_DIR}"
printf '%s\n' "${password}" \
| gpg2 ${GPG_OPTS} --encrypt --output "${STORE_DIR}"/"${1}".gpg
}