commit 411c6d90d4d6fe80e86f8724c7ecea568fdec427 parent a13749a21c14416087667eeec3b0f4977d3d8d70 Author: Sören Tempel <git+mail@soeren-tempel.net> Date: Sat, 13 Dec 2014 01:51:46 +0100 Use the same environment variables as pass Diffstat:
M | README.pod | | | 8 | ++++---- |
M | tpm | | | 8 | ++++---- |
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.pod b/README.pod @@ -20,11 +20,11 @@ corresponding entry to STDOUT. =over 4 -=item TPM_STORE_DIR +=item PASSWORD_STORE_DIR The storage directory (default: ~/.password-store). -=item TPM_STORE_KEY +=item PASSWORD_STORE_KEY GPG key to encrypt files with (default: self). @@ -34,11 +34,11 @@ GPG key to encrypt files with (default: self). =over 4 -=item $TPM_STORE_DIR +=item $PASSWORD_STORE_DIR The storage directory. -=item $TPM_STORE_DIR/.gpg-id +=item $PASSWORD_STORE_DIR/.gpg-id Provided for compatiblity with pass(1). Overwrites $TPM_STORE_KEY. diff --git a/tpm b/tpm @@ -7,16 +7,16 @@ umask 077 ## GPG_OPTS="--quiet --yes --batch" -STORE_DIR="${TPM_STORE_DIR:-${HOME}/.password-store}" +STORE_DIR="${PASSWORD_STORE_DIR:-${HOME}/.password-store}" if [[ -r "${STORE_DIR}/.gpg-id" ]]; then - read -r TPM_STORE_KEY < "${STORE_DIR}/.gpg-id" + read -r PASSWORD_STORE_KEY < "${STORE_DIR}/.gpg-id" fi -if [[ -z "${TPM_STORE_KEY}" ]]; then +if [[ -z "${PASSWORD_STORE_KEY}" ]]; then GPG_OPTS="${GPG_OPTS} --default-recipient-self" else - GPG_OPTS="${GPG_OPTS} --recipient '${TPM_STORE_KEY}'" + GPG_OPTS="${GPG_OPTS} --recipient '${PASSWORD_STORE_KEY}'" fi ##