commit 9f54b1bb33d8fdd0039861e3f2c044435755c3e4 from: the xhr date: Tue Jul 04 11:54:52 2017 UTC Make STORE_DIR read only commit - 3a3cd960c07bd9f2fdc92ace64bdd85f79190be0 commit + 9f54b1bb33d8fdd0039861e3f2c044435755c3e4 blob - 1a37ff7a4f227ff6fe2ba2c24f462818e42a4176 blob + dc4aebab864d2f249bf76bb9f7019806a085e570 --- tpm +++ tpm @@ -18,23 +18,28 @@ umask 077 ## -# Variables +# Variables r/w ## GPG_OPTS="--quiet --yes" GPGB="gpg" -STORE_DIR="${HOME}/.password-store" TPMDIR="/tmp" NUKE="rm" -if [ -r "${STORE_DIR}/.gpg-id" ] && [ -z "${PASSWORD_STORE_KEY}" ]; then - read -r PASSWORD_STORE_KEY < "${STORE_DIR}/.gpg-id" -fi +## +# Variables r/o +## +readonly STORE_DIR="${HOME}/.password-store" + ## # Helper ## +if [ -r "${STORE_DIR}/.gpg-id" ] && [ -z "${PASSWORD_STORE_KEY}" ]; then + read -r PASSWORD_STORE_KEY < "${STORE_DIR}/.gpg-id" +fi + usage() { echo "Usage: $(basename $0) [option] [argument]" echo