Last active
March 30, 2017 13:42
-
-
Save jmuchovej/c45dc4152fbbb6375e8116bf8e1a5e24 to your computer and use it in GitHub Desktop.
Determines the OS of your machine to utilize the proper repositories to install software.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -eq 0 ]] | |
then | |
inst = "" | |
for i in "$@" | |
do | |
inst = "$inst $i" | |
done | |
fi | |
source /etc/os-release | |
case $ID in: | |
"linuxmint") | |
"ubuntu") | |
apt update -y | |
if [[ $# -eq 0 ]] then | |
apt install -y $inst | |
fi | |
;; | |
"arch") | |
yaourt -Sy | |
if [[ $# -eq 0 ]] then | |
yaourt -S $inst | |
fi | |
;; | |
*) | |
echo "Uh-oh! Looks like your OS isn't familiarized, you can edit this yourself though. :)" | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment