Fix Arch installdeps

I don't know if this is right or not, but I am running an Arch system and tried running `./installdeps` and nothing happened. So I went into the script and figured that it got stuck in the `elif [ -f /etc/os-release ];` block. This file exists on Arch as well, so the block is executed, but arch is not listed in the `case`, so the script exited without doing anything. And it's only checking for pacman after that, so it never ran `arch_installdeps`.

Don't know if this is the 100% correct fix, but it's working for me now and should also catch cases like that in the future.
This commit is contained in:
Leon Tepe 2021-08-08 12:33:19 +02:00 committed by GitHub
parent 96ce316bcd
commit 276689edda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -176,6 +176,8 @@ linux_installdeps() {
solus_installdeps
elif [ -f /etc/gentoo-release ]; then
gentoo_installdeps
elif [ -x /usr/bin/pacman ]; then
archlinux_installdeps
elif [ -f /etc/os-release ]; then
case "$(. /etc/os-release; echo "${ID_LIKE:-$ID}")" in
*suse*)
@ -184,9 +186,10 @@ linux_installdeps() {
nixos)
nixos_installdeps
;;
*)
error "Don't know how to install deps on your version of Linux"
;;
esac
elif [ -x /usr/bin/pacman ]; then
archlinux_installdeps
else
error "Don't know how to install deps on your version of Linux"
fi