[PATCH] Use $HOME/.passrc for configuration purpose

Teubel György tgyurci at gmail.com
Thu Aug 13 16:28:01 CEST 2020


This way PASSWORD_STORE_* variables can be set globally
and configuration does not depend on the invoking environment.
---
 src/password-store.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/password-store.sh b/src/password-store.sh
index 77f3eda..1e80829 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -3,6 +3,10 @@
 # Copyright (C) 2012 - 2018 Jason A. Donenfeld <Jason at zx2c4.com>. All Rights Reserved.
 # This file is licensed under the GPLv2+. Please see COPYING for more information.
 
+PASSRC="${PASSWORD_STORE_RC:-"$HOME/.passrc"}"
+
+[[ -f "$PASSRC" && -r "$PASSRC" ]] && source "$PASSRC"
+
 umask "${PASSWORD_STORE_UMASK:-077}"
 set -o pipefail
 
-- 
2.28.0



More information about the Password-Store mailing list