From c0bfdd35606d6f6ebfde40ae36edaa1f1e831b2f Mon Sep 17 00:00:00 2001 From: goodroot Date: Sat, 6 Sep 2025 15:29:20 -0700 Subject: [PATCH] Revert install script to simple working version - Remove complex sudo -u commands that require FIDO authentication - Go back to simple ./scripts/install-omarchy.sh approach - Remove pre_remove function that was causing issues - This matches the last known working version --- hyprwhspr.install | 41 +++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/hyprwhspr.install b/hyprwhspr.install index 73b013b00462..6a591b912e62 100644 --- a/hyprwhspr.install +++ b/hyprwhspr.install @@ -1,24 +1,20 @@ -post_install() { +alsold;post_install() { echo "HyprWhspr has been installed to /opt/hyprwhspr/" echo "" - echo "Running setup script to configure permissions and services..." + echo "Running automatic setup..." - # Run the installation script as the installing user + # Run the installation script automatically if [ -f "/opt/hyprwhspr/scripts/install-omarchy.sh" ]; then - INSTALLING_USER="${SUDO_USER:-$USER}" - echo "Executing setup as user: $INSTALLING_USER" - - # Run the script as the user (it will use sudo internally when needed) - # Set environment variable to make it non-interactive for AUR - sudo -u "$INSTALLING_USER" env HYPRWHSPR_AUR_INSTALL=1 /opt/hyprwhspr/scripts/install-omarchy.sh - + echo "Executing installation script..." + cd /opt/hyprwhspr + ./scripts/install-omarchy.sh echo "" echo "✅ HyprWhspr setup completed successfully!" echo "" - echo "⚠️ IMPORTANT: Log out and back in for group changes to take effect" + echo "⚠️ IMPORTANT: Log out and back in to ensure proper permissions" echo " Then use Super+Alt+D to start dictation!" else - echo "❌ Setup script not found. Please run manually:" + echo "❌ Installation script not found. Please run manually:" echo " /opt/hyprwhspr/scripts/install-omarchy.sh" fi @@ -29,27 +25,20 @@ post_install() { post_upgrade() { echo "HyprWhspr has been upgraded successfully!" echo "" - echo "Re-running setup to update configuration..." + echo "Running automatic setup update..." # Re-run the installation script to update components if [ -f "/opt/hyprwhspr/scripts/install-omarchy.sh" ]; then - INSTALLING_USER="${SUDO_USER:-$USER}" - sudo -u "$INSTALLING_USER" env HYPRWHSPR_AUR_INSTALL=1 /opt/hyprwhspr/scripts/install-omarchy.sh + echo "Updating whisper.cpp and dependencies..." + cd /opt/hyprwhspr + ./scripts/install-omarchy.sh echo "" echo "✅ HyprWhspr update completed successfully!" + echo "" + echo "⚠️ IMPORTANT: Log out and back in to ensure proper permissions" else - echo "❌ Setup script not found. Please run manually:" + echo "❌ Installation script not found. Please run manually:" echo " /opt/hyprwhspr/scripts/install-omarchy.sh" fi } -pre_remove() { - echo "Stopping HyprWhspr services..." - - # Stop services gracefully - INSTALLING_USER="${SUDO_USER:-$USER}" - sudo -u "$INSTALLING_USER" systemctl --user stop hyprwhspr.service 2>/dev/null || true - sudo -u "$INSTALLING_USER" systemctl --user stop ydotoold.service 2>/dev/null || true - - echo "✅ Services stopped" -}