Files
2026-10-21 20:40:39 -04:00

23 lines
611 B
Bash
Executable File

#!/usr/bin/env bash
# Register the native messaging host with Firefox for the current user.
set -euo pipefail
HOST_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
HOST_SCRIPT="$HOST_DIR/quick_profile_host.py"
MANIFEST_DIR="$HOME/.mozilla/native-messaging-hosts"
chmod +x "$HOST_SCRIPT"
mkdir -p "$MANIFEST_DIR"
cat > "$MANIFEST_DIR/quick_profile.json" <<EOF
{
"name": "quick_profile",
"description": "Quick Profile native host",
"path": "$HOST_SCRIPT",
"type": "stdio",
"allowed_extensions": ["quick-profile@timothykim"]
}
EOF
echo "Installed $MANIFEST_DIR/quick_profile.json -> $HOST_SCRIPT"