diff --git a/wine/install-dependencies.sh b/wine/install-dependencies-arch.sh old mode 100755 new mode 100644 similarity index 61% rename from wine/install-dependencies.sh rename to wine/install-dependencies-arch.sh index 5aee44f..d750bdc --- a/wine/install-dependencies.sh +++ b/wine/install-dependencies-arch.sh @@ -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 \ No newline at end of file diff --git a/wine/install-dependencies-debian.sh b/wine/install-dependencies-debian.sh new file mode 100644 index 0000000..70a59ed --- /dev/null +++ b/wine/install-dependencies-debian.sh @@ -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