From 8e6ad80c4d49e735af11e0b15f6d152f566b4984 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 24 Feb 2019 23:53:39 +0200 Subject: [PATCH] fixed bug with creating entries --- pash | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pash b/pash index 409823b..f1a9ecc 100755 --- a/pash +++ b/pash @@ -20,8 +20,9 @@ pw_add() { die "Failed to generate a password." # Handle category in store name. - [[ $1 == */* ]] && + [[ $1 == */* ]] && { mkdir -p "${1%/*}" || die "Couldn't create category '${1%/*}'." + } gpg2 -co "$1.gpg" <<< "$password" } @@ -58,12 +59,11 @@ pw_gen() { # data from '/dev/urandom' to meet the length requirement. # example: 50 lines from /dev/urandom == 50 char password mapfile -tn "${length:=50}" rand