From 57a4dce9b6f060b509dcd5d5487a95eb9812924b Mon Sep 17 00:00:00 2001 From: Token2 Date: Sat, 6 Sep 2025 21:12:15 +0200 Subject: [PATCH] Update gui-mac.py --- gui-mac.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gui-mac.py b/gui-mac.py index e7bc3aa..c15c3a0 100644 --- a/gui-mac.py +++ b/gui-mac.py @@ -757,7 +757,6 @@ def terminal_path(): set -e APP_PATH="/Applications/fido2-manage.app" -#CLI_SCRIPT="$APP_PATH/Contents/MacOS/fido2-manage-mac.sh" CLI_SCRIPT="$APP_PATH/Contents/Frameworks/fido2-manage-mac.sh" SYMLINK_TARGET="/usr/local/bin/fido2-manage" @@ -772,6 +771,16 @@ fi echo "✅ Found FIDO2 Manager app" + +# Ensure /usr/local/bin exists +if [[ ! -d "/usr/local/bin" ]]; then + echo "📂 /usr/local/bin does not exist. Creating..." + sudo mkdir -p /usr/local/bin + sudo chown "$(whoami)":admin /usr/local/bin + echo "✅ /usr/local/bin created" +fi + + if [[ -L "$SYMLINK_TARGET" ]]; then existing_target=$(readlink "$SYMLINK_TARGET") if [[ "$existing_target" == "$CLI_SCRIPT" ]]; then @@ -801,6 +810,9 @@ elif [[ -f "$SYMLINK_TARGET" ]]; then fi echo "Creating symlink: $SYMLINK_TARGET -> $CLI_SCRIPT" + + + if sudo ln -sf "$CLI_SCRIPT" "$SYMLINK_TARGET"; then echo "✅ CLI installed successfully!" echo ""