Skip to content

Instantly share code, notes, and snippets.

@sli
Last active November 29, 2016 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sli/fcb6f8dadf14aacb7a35a8c81aaf1b0b to your computer and use it in GitHub Desktop.
Save sli/fcb6f8dadf14aacb7a35a8c81aaf1b0b to your computer and use it in GitHub Desktop.
Installs deps for higan.
#!/bin/bash
PS3="Choose your package manager: "
options=("apt" "dnf" "yum" "pacman" "Cancel")
select opt in "${options[@]}"
do
case $opt in
"apt")
echo "installing with apt"
cmd="apt-get install"
pkgs="gcc-4.9 g++-4.9 xorg-dev libudev-dev libao-dev libopenal-dev"
break
;;
"dnf")
echo "installing with dnf"
cmd="dnf install"
pkgs=""
break
;;
"yum")
echo "installing with yum"
cmd="yum install"
pkgs=""
break
;;
"pacman")
echo "installing with pacman"
cmd="pacman -S"
pkgs=""
break
;;
"Cancel")
break
;;
*)
echo "unknown option"
;;
esac
done
eval "sudo $cmd $pkgs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment