spm

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

commit a3e9af3e0612142c1ce5eb8dc85f48cdb4696299
parent c41cfe9a264a6accf481662ac1b80c84fc0651da
Author: Sören Tempel <soeren+git@soeren-tempel.net>
Date:   Fri, 25 Sep 2015 00:02:11 +0200

Implement some shellcheck suggestions

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

diff --git a/tpm b/tpm @@ -23,7 +23,7 @@ umask 077 GPG_OPTS="--quiet --yes --batch" STORE_DIR="${PASSWORD_STORE_DIR:-${HOME}/.password-store}" -if [ -r "${STORE_DIR}/.gpg-id" -a -z "${PASSWORD_STORE_KEY}" ]; then +if [ -r "${STORE_DIR}/.gpg-id" ] && [ -z "${PASSWORD_STORE_KEY}" ]; then read -r PASSWORD_STORE_KEY < "${STORE_DIR}/.gpg-id" fi @@ -83,8 +83,12 @@ insert() { abort "This entry already exists, please remove it first." fi + password="" readpw "Password for '${entry_name}': " password - [ -t 0 ] && printf "\n" + + if [ -t 0 ]; then + printf "\n" + fi if [ -z "${password}" ]; then abort "You didn't specify a password."