Skip to content

Commit

Permalink
fix alternative root directory
Browse files Browse the repository at this point in the history
  • Loading branch information
carnager committed Nov 16, 2015
1 parent bafd1d7 commit 4095867
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rofi-pass
Original file line number Diff line number Diff line change
Expand Up @@ -478,17 +478,17 @@ fi

# check if alternative root directory was given on commandline
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
root="${2}"
export root="${2}"
elif [[ -n $root ]]; then
root="${root}"
export root="${root}"
elif [[ -n ${PASSWORD_STORE_DIR} ]]; then
root=${PASSWORD_STORE_DIR}
export root=${PASSWORD_STORE_DIR}
else
root="$HOME/.password-store"
export root="$HOME/.password-store"
fi
PASSWORD_STORE_DIR="${root}"
export PASSWORD_STORE_DIR="${root}"
case $1 in
--insert)
insertPass
Expand Down

0 comments on commit 4095867

Please sign in to comment.