Add CentOS support

This commit is contained in:
Andrew Schwartzmeyer committed 2016-07-18 10:59:23 -07:00
1 parent 8ef8f9fada
commit 0f7748a70b
1 file changed
+27 -5
+27 -5
View File
@@ -16,15 +16,27 @@ get_info() {
# Get OS specific asset ID and package name # Get OS specific asset ID and package name
case "$OSTYPE" in case "$OSTYPE" in
linux*) linux*)
source /etc/os-release
echo $ID
# Install curl and wget to download package # Install curl and wget to download package
sudo apt-get install -y curl wget case "$ID" in
info=$(get_info deb) centos*)
sudo yum install -y curl wget
info=$(get_info rpm)
;;
ubuntu)
sudo apt-get install -y curl wget
info=$(get_info deb)
;;
*)
exit 2 >&2 "$NAME is not supported!"
esac
;; ;;
darwin*) darwin*)
info=$(get_info pkg) info=$(get_info pkg)
;; ;;
*) *)
exit 2 >&2 "$OSTYPE not supported!" exit 2 >&2 "$OSTYPE is not supported!"
;; ;;
esac esac
@@ -38,9 +50,19 @@ curl_ -H 'Accept: application/octet-stream' https://api.github.com/repos/PowerSh
# Installs PowerShell package # Installs PowerShell package
case "$OSTYPE" in case "$OSTYPE" in
linux*) linux*)
source /etc/os-release
# Install dependencies # Install dependencies
sudo apt-get install -y libunwind8 libicu52 case "$ID" in
sudo dpkg -i ./$package centos)
sudo yum install -y libicu libunwind
sudo yum install "./$package"
;;
ubuntu)
sudo apt-get install -y libunwind8 libicu52
sudo dpkg -i "./$package"
;;
*)
esac
;; ;;
darwin*) darwin*)
sudo installer -pkg ./$package -target / sudo installer -pkg ./$package -target /