aboutsummaryrefslogtreecommitdiff
path: root/home/dot_local/share/pass-extensions/executable_directory.bash
blob: 90952db367476eca17b103ea87804ea04ec992ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash
# print the initialized password store directory as a fully qualified path.
# exits with code 1 if the password store is not initialized.
dir="${PASSWORD_STORE_DIR-$HOME/.password-store}"
dir="$(realpath "$dir")"
if [ -e "$dir/.gpg-id" ] ; then
	echo "$dir"
else
	echo "error: password store is not initialized" >&2
	exit 1
fi