better handle root variable

This commit is contained in:
Rasmus Steinke 2015-08-20 05:22:49 +02:00
parent d36e0e16dd
commit 0189b377a9

View File

@ -29,7 +29,11 @@ fi
if [[ -n "$2" && "$1" == "--root" ]]; then
root="${2}"
else
root="${root}"
if [[ -n $root ]]; then
root="${basedir}"
else
root="$HOME/.password-store"
fi
fi
# get all password files and create an array