summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/bokftui-bw7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/bokftui-bw b/scripts/bokftui-bw
index 985714d..7f5a688 100755
--- a/scripts/bokftui-bw
+++ b/scripts/bokftui-bw
@@ -12,8 +12,9 @@
# BOKF_BW_FIELD custom field that holds the secret (default: login.password)
# BOKF_BW_KIND password (default) exports BOKFD_PASSWORD;
# token exports BOKFD_TOKEN
-# BOKFTUI binary to exec (default: build/bokftui in the checkout the
-# script lives in, else bokftui from PATH)
+# BOKFTUI binary to exec (default: build/bokftui next to the script's
+# checkout, then ./build/bokftui in the current directory, else
+# bokftui from PATH)
#
# Works with the official Bitwarden CLI (bw) or with rbw. With bw the session
# key is cached in ~/.cache/bokf/bw-session (mode 0600) so the master password
@@ -32,6 +33,8 @@ if [ -z "$BOKFTUI" ]; then
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
if [ -x "$root/build/bokftui" ]; then
BOKFTUI="$root/build/bokftui"
+ elif [ -x "./build/bokftui" ]; then
+ BOKFTUI="$PWD/build/bokftui"
else
BOKFTUI=bokftui
fi