Nostro/packaging/system/nostro
2026-11-01 18:35:23 +01:00

19 lines
1.1 KiB
Shell
Executable file

#!/bin/sh
# SPDX-License-Identifier: LGPL-3.0-only
# SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
#
# The nostro command: the CLI from the net.catcrafts.Nostro Flatpak, run as you. It asks nostrod over the system bus,
# and your session's polkit agent asks for your password before anything moves money. Install: /usr/bin/nostro (a
# package) or /usr/local/bin/nostro (install.sh).
# Before nostrod, nostro kept the bank's secrets in the user's own home, where every program they run can read them.
# (With XDG_CONFIG_HOME set, it looked in $XDG_CONFIG_HOME/.config/nostro.)
for old in "${XDG_CONFIG_HOME:-$HOME/.config}/nostro/connectors.json" "${XDG_CONFIG_HOME:-$HOME}/.config/nostro/connectors.json"; do
if [ -e "$old" ]; then
echo "nostro: $old is an older nostro's, and holds your bank's API key where any program you run can read it." \
"Revoke that key in the bunq app, add a new one with 'nostro connectors add bunq', and delete the file." >&2
break
fi
done
exec /usr/bin/flatpak run --system net.catcrafts.Nostro//stable "$@"