spm

Personal fork of spm (simple password manager)
git clone git@getsh.org:spm.git
Log | Files | Refs | README | LICENSE

commit 39eeb5c39a3da37a9aa0bf0ae27f7cf7fdbe442b
parent 1195a1ccfd3d903e073ecd4092d1893580ef9b3c
Author: Klemens Nanni <kl3@posteo.org>
Date:   Wed,  2 Mar 2016 05:05:22 +0100

Check permissions as well

Diffstat:
Mtpm | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tpm b/tpm @@ -82,7 +82,7 @@ list() { remove() { [ -z "${1}" ] && abort "USAGE: tpm remove ENTRY" - [ -e "${STORE_DIR}"/"${1}".gpg ] || abort "The requested entry doesn't exist." + [ -w "${STORE_DIR}"/"${1}".gpg ] || abort "The requested entry doesn't exist." rm -i "${STORE_DIR}"/"${1}".gpg && echo "${1} has been removed." } @@ -92,7 +92,7 @@ show() { entry="${STORE_DIR}"/"${1}".gpg - if [ ! -e "${entry}" ]; then + if [ ! -r "${entry}" ]; then entry=$(find "${STORE_DIR}" -type f -iwholename "*${1}*".gpg) [ -z "${entry}" ] && abort "The requested entry doesn't exist."