leapp.sh 801 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. REPO="noovolari/leapp"
  3. BINARY_NAME="leapp"
  4. TARGET_DIR="$HOME/.local/bin"
  5. BINARY_PATH="$TARGET_DIR/$BINARY_NAME"
  6. DOWNLOAD_URL="https://asset.noovolari.com/latest/Leapp-appImage.zip"
  7. if [ ! -x "$BINARY_PATH" ]; then
  8. notify-send "📦 Installing $BINARY_NAME" "Downloading from $REPO..."
  9. mkdir -p "$TARGET_DIR"
  10. wget -q -O /tmp/leapp.zip "$DOWNLOAD_URL" || {
  11. notify-send -u critical "Installation Failed" "Failed to download $BINARY_NAME from $REPO"
  12. exit 1
  13. }
  14. unzip -q /tmp/leapp.zip -d /tmp/leapp_extract
  15. find /tmp/leapp_extract -name "Leapp*" -type f | head -1 | xargs -I {} mv {} "$BINARY_PATH"
  16. chmod +x "$BINARY_PATH"
  17. rm -rf /tmp/leapp.zip /tmp/leapp_extract
  18. notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
  19. fi
  20. exec "$BINARY_PATH" "$@"