fix alternative root directory

This commit is contained in:
Rasmus Steinke 2015-11-16 18:24:02 +01:00
parent bafd1d76be
commit 4095867400

View File

@ -478,17 +478,17 @@ fi
# check if alternative root directory was given on commandline # check if alternative root directory was given on commandline
if [[ $1 == "--last-used" || $1 == "--show-last" ]]; then if [[ $1 == "--last-used" || $1 == "--show-last" ]]; then
root=$(awk -F ': ' '{ print $1 }' $HOME/.config/rofi-pass/last_used) export root=$(awk -F ': ' '{ print $1 }' $HOME/.config/rofi-pass/last_used)
elif [[ -n "$2" && "$1" == "--root" ]]; then elif [[ -n "$2" && "$1" == "--root" ]]; then
root="${2}" export root="${2}"
elif [[ -n $root ]]; then elif [[ -n $root ]]; then
root="${root}" export root="${root}"
elif [[ -n ${PASSWORD_STORE_DIR} ]]; then elif [[ -n ${PASSWORD_STORE_DIR} ]]; then
root=${PASSWORD_STORE_DIR} export root=${PASSWORD_STORE_DIR}
else else
root="$HOME/.password-store" export root="$HOME/.password-store"
fi fi
PASSWORD_STORE_DIR="${root}" export PASSWORD_STORE_DIR="${root}"
case $1 in case $1 in
--insert) --insert)
insertPass insertPass