Skip to content

Commit

Permalink
Support cli in flatpak wrapper script
Browse files Browse the repository at this point in the history
  • Loading branch information
louib committed Apr 1, 2022
1 parent 153a816 commit 809dce5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions utils/flatpak-command-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ readonly arg2='[email protected]'

# Browser integration is enabled if unix socket exists
if [[ -S "${XDG_RUNTIME_DIR}/app/${appId}/${appId}.BrowserServer" ]]; then
if [[ "$1" =~ "${arg1}" ]] || [[ "$2" =~ "${arg2}" ]]; then
if [[ "$1" == "${arg1}" ]] || [[ "$2" == "${arg2}" ]]; then
exec keepassxc-proxy "$@"
fi
fi

# If no arguments are matched or browser integration is off execute keepassxc
# If the first argument is "cli", execute keepassxc-cli instead.
if [[ "$1" == "cli" ]]; then
exec keepassxc-cli "${@:2}"
fi

# If no arguments are matched or browser integration is off, execute keepassxc
exec keepassxc "$@"

0 comments on commit 809dce5

Please sign in to comment.