#!/bin/sh set -e ask_install () { PACKAGE="$1" APT_NAME="$2" printf "Install %s? [y/N]: " "$PACKAGE" read answer case "$answer" in y|Y) echo "Installing $PACKAGE..." sudo apt install -y "$APT_NAME" ;; *) echo "Skipping $PACKAGE" ;; esac echo } install_brave () { PACKAGE="Brave" printf "Install %s? [y/N]: " "$PACKAGE" read answer case "$answer" in y|Y) echo "Installing $PACKAGE..." curl -fsS https://dl.brave.com/install.sh | sh ;; *) echo "Skipping $PACKAGE" ;; esac echo } install_discord () { PACKAGE="Discord" DISCORD_URL="https://discord.com/api/download?platform=linux&format=deb" DEB_FILE="discord_latest_amd64.deb" printf "Install %s? [y/N]: " "$PACKAGE" read answer case "$answer" in y|Y) echo "Installing $PACKAGE..." wget -O "$DEB_FILE" "$DISCORD_URL" sudo dpkg -i "$DEB_FILE" || sudo apt -f install -y rm -f "$DEB_FILE" ;; *) echo "Skipping $PACKAGE" ;; esac echo } install_angry_ip_scanner () { PACKAGE="Angry IP Scanner" REPO="angryip/ipscan" ARCH="amd64" printf "Install %s? [y/N]: " "$PACKAGE" read answer case "$answer" in y|Y) echo "Installing $PACKAGE..." # Get latest release tag from GitHub API LATEST_TAG=$(curl -s https://api.github.com/repos/$REPO/releases/latest \ | grep '"tag_name"' \ | cut -d '"' -f4) if [[ -z "$LATEST_TAG" ]]; then echo "❌ Failed to determine latest version" exit 1 fi # Extract version number (e.g. 3.6.2) VERSION="${LATEST_TAG#v}" DEB_FILE="ipscan_${VERSION}_${ARCH}.deb" DOWNLOAD_URL="https://github.com/$REPO/releases/download/$LATEST_TAG/$DEB_FILE" wget -q --show-progress "$DOWNLOAD_URL" sudo dpkg -i "$DEB_FILE" || sudo apt -f install -y # Cleanup rm -f "$DEB_FILE" ;; *) echo "Skipping $PACKAGE" ;; esac echo } install_onlyoffice () { PACKAGE="OnlyOffice" printf "Install %s? [y/N]: " "$PACKAGE" read answer case "$answer" in y|Y) echo "Installing $PACKAGE..." #Create GPG directory mkdir -p -m 700 ~/.gnupg #Import the ONLYOFFICE GPG key gpg --no-default-keyring \ --keyring gnupg-ring:/tmp/onlyoffice.gpg \ --keyserver hkp://keyserver.ubuntu.com:80 \ --recv-keys CB2DE8E5 #Fix permissions and move the keyring chmod 644 /tmp/onlyoffice.gpg sudo chown root:root /tmp/onlyoffice.gpg sudo mv /tmp/onlyoffice.gpg /usr/share/keyrings/onlyoffice.gpg #Add the ONLYOFFICE repository echo "deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://download.onlyoffice.com/repo/debian squeeze main" \ | sudo tee /etc/apt/sources.list.d/onlyoffice.list > /dev/null #Update package lists sudo apt-get update #Install ONLYOFFICE Desktop Editors sudo apt-get install -y onlyoffice-desktopeditors #Remove LibreOffice sudo apt purge libreoffice* sudo apt autoremove --purge rm -rf ~/.config/libreoffice rm -rf ~/.cache/libreoffice rm -rf ~/.local/share/libreoffice ;; *) echo "Skipping $PACKAGE" ;; esac echo } install_sublime () { PACKAGE="Sublime Text Editor" printf "Install %s? [y/N]: " "$PACKAGE" read answer case "$answer" in y|Y) echo "Installing $PACKAGE..." sudo wget -O- https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/sublimehq.gpg echo 'deb [signed-by=/usr/share/keyrings/sublimehq.gpg] https://download.sublimetext.com/ apt/stable/' | sudo tee /etc/apt/sources.list.d/sublime-text.list sudo apt update sudo apt install sublime-text rm -f ./wget-log ;; *) echo "Skipping $PACKAGE" ;; esac echo } echo "Updating package list..." sudo apt update echo # APT packages ask_install "PCManFM" "pcmanfm" ask_install "Wireshark" "wireshark" ask_install "Flameshot" "flameshot" ask_install "Remmina" "remmina" ask_install "PuTTY" "putty" ask_install "WireGuard" "wireguard" ask_install "Steam" "steam" ask_install "mpv" "mpv" ask_install "Hydrapaper" "hydrapaper" #wine #WineZGUI #TLP #TLP-UI #Minecraft #Modrinth App # Not in standard Debian repos install_brave install_discord install_angry_ip_scanner install_onlyoffice install_sublime #"Flatseal" "Install via Flatpak: flatpak install flathub com.github.tchx84.Flatseal" #"Stremio" "Download from https://www.stremio.com" #"Visual Studio Code" "Requires Microsoft APT repo" echo "Finished."