nosql.sh 616 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. BINARY_NAME="nosql"
  3. TARGET_DIR="$HOME/.local/bin"
  4. BINARY_PATH="$TARGET_DIR/$BINARY_NAME"
  5. DOWNLOAD_URL="https://s3.nosqlbooster.com/download/releasesv7/nosqlbooster4mongo-7.1.17.AppImage"
  6. if [ ! -x "$BINARY_PATH" ]; then
  7. notify-send "📦 Installing $BINARY_NAME" "Downloading NoSQL Booster..."
  8. mkdir -p "$TARGET_DIR"
  9. wget -q -O "$BINARY_PATH" "$DOWNLOAD_URL" || {
  10. notify-send -u critical "Installation Failed" "Failed to download $BINARY_NAME"
  11. exit 1
  12. }
  13. chmod +x "$BINARY_PATH"
  14. notify-send "Installation Complete" "$BINARY_NAME has been installed successfully"
  15. fi
  16. exec "$BINARY_PATH" "$@"