Split dependency installation scripts into distro specific scripts. This is more reliable than the script trying to figure out which distro is running on its own.
This commit is contained in:
42
wine/install-dependencies.sh → wine/install-dependencies-arch.sh
Executable file → Normal file
42
wine/install-dependencies.sh → wine/install-dependencies-arch.sh
Executable file → Normal file
@ -3,13 +3,9 @@
|
||||
# Immediately exit if errors are encountered.
|
||||
set -e
|
||||
|
||||
# Installer/configuration tool for wine
|
||||
# If this fails on your system, please contact storm_dragon@linux-a11y.org
|
||||
# Wine dependencies installer for Arch Linux
|
||||
# If this fails on your system, please contact storm_dragon@stormux.org
|
||||
|
||||
is_function() {
|
||||
LC_ALL=C type "$1" 2> /dev/null | grep -q "$1 is a function"
|
||||
}
|
||||
|
||||
configure_arch() {
|
||||
packageList=(
|
||||
cabextract
|
||||
@ -29,7 +25,7 @@ configure_arch() {
|
||||
mpg123
|
||||
libpulse
|
||||
libpng
|
||||
libjpeg-turbo
|
||||
libjpeg-turbo
|
||||
gnutls
|
||||
alsa-plugins
|
||||
alsa-lib
|
||||
@ -70,36 +66,10 @@ configure_arch() {
|
||||
# Some of these may fail, so do them in a for loop.
|
||||
yay -Syy
|
||||
for i in "${packageList[@]}" ; do
|
||||
yay -S --needed --noconfirm $i
|
||||
yay -S --needed --noconfirm "$i" || true
|
||||
done
|
||||
}
|
||||
|
||||
configure_debian() {
|
||||
packageList=(
|
||||
curl
|
||||
dialog
|
||||
gawk
|
||||
gstreamer1.0-plugins-bad:i386
|
||||
gstreamer1.0-plugins-good:i386
|
||||
gstreamer1.0-plugins-ugly:i386
|
||||
mono-complete
|
||||
ncurses5-dev
|
||||
w3m
|
||||
winehq-stable
|
||||
)
|
||||
# make sure 32 bit libraries are available
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt install --install-recommends ${packageList[*]}
|
||||
}
|
||||
configure_arch
|
||||
|
||||
|
||||
distro="$(head -1 /etc/issue | cut -d ' ' -f1)"
|
||||
distro="${distro,,}"
|
||||
|
||||
if is_function configure_${distro} ; then
|
||||
configure_${distro}
|
||||
else
|
||||
echo "${distro^} is not yet supported. If you want it added, please contact storm_dragon@linux-a11y.org" | fold -s -w 72
|
||||
fi
|
||||
|
||||
exit 0
|
||||
exit 0
|
29
wine/install-dependencies-debian.sh
Normal file
29
wine/install-dependencies-debian.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Immediately exit if errors are encountered.
|
||||
set -e
|
||||
|
||||
# Wine dependencies installer for Debian/Ubuntu
|
||||
# If this fails on your system, please contact storm_dragon@stormux.org
|
||||
|
||||
configure_debian() {
|
||||
packageList=(
|
||||
curl
|
||||
dialog
|
||||
gawk
|
||||
gstreamer1.0-plugins-bad:i386
|
||||
gstreamer1.0-plugins-good:i386
|
||||
gstreamer1.0-plugins-ugly:i386
|
||||
mono-complete
|
||||
ncurses5-dev
|
||||
w3m
|
||||
winehq-stable
|
||||
)
|
||||
# make sure 32 bit libraries are available
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt install --install-recommends "${packageList[@]}"
|
||||
}
|
||||
|
||||
configure_debian
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user