Skip to content

Instantly share code, notes, and snippets.

@EnterTheVoid-x86
Created July 18, 2022 22:26
Show Gist options
  • Save EnterTheVoid-x86/d534598a2eaaf44f906fb82f54712987 to your computer and use it in GitHub Desktop.
Save EnterTheVoid-x86/d534598a2eaaf44f906fb82f54712987 to your computer and use it in GitHub Desktop.
Wine installer for ubuntu
#!/bin/bash
echo "Please select a number based on your Ubuntu version:"
echo "1. 22.04 Jammy"
echo "2. 21.10 Impish"
echo "3. 20.04 Focal"
echo "4. 18.04 Bionic"
read read
if [ $read == "1" ]; then
echo "Installing Wine 7.13 Staging for Ubuntu 22.04..."
sudo dpkg --add-architecture i386
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt update
sudo apt install --install-recommends winehq-staging
elif [ $read == "2" ]; then
echo "Installing Wine 7.13 Staging for Ubuntu 21.10..."
sudo dpkg --add-architecture i386
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/impish/winehq-impish.sources
sudo apt update
sudo apt install --install-recommends whinehq-staging
elif [ $read == "3" ]; then
echo "Installing Wine 7.13 Staging for Ubuntu 20.04..."
sudo dpkg --add-architecture i386
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
sudo apt update
sudo apt install --install-recommends whinehq-staging
elif [ $read == "4" ]; then
echo "Installing Wine 7.13 Staging for Ubuntu 18.04..."
sudo dpkg --add-architecture i386
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources
sudo apt update
sudo apt install --install-recommends winehq-staging
else
echo "Invalid input. Exiting..."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment