spm

Personal fork of spm (simple password manager)

commit 6c4dd8c685c8fbac5cdb8e2ad2a51d8c221431e4
parent 128a1354159bde3eeeff53eedbd469e5bd0fb2c2
Author: Sören Tempel <soeren+git@soeren-tempel.net>
Date: Thu, 24 Sep 2015 21:31:24 +0200

style fixes
1 file changed, 3 insertions(+), 3 deletions(-)
M
tpm
|
6
+++---
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" ] && [ -z "${PASSWORD_STORE_KEY}" ]; then
+if [ -r "${STORE_DIR}/.gpg-id" -a -z "${PASSWORD_STORE_KEY}" ]; then
   read -r PASSWORD_STORE_KEY < "${STORE_DIR}/.gpg-id"
 fi
 

@@ -91,8 +91,8 @@ insert() {
   fi
 
   mkdir -p "$(dirname "${entry_path}")"
-  printf '%s\n' "${password}" | gpg2 \
-    ${GPG_OPTS} --encrypt --output "${entry_path}"
+  printf '%s\n' "${password}" | gpg2 ${GPG_OPTS} \
+    --encrypt --output "${entry_path}"
 }
 
 ##