From 83bcc0f3aa3bb5bf9d67275da2cf0e7df9114af0 Mon Sep 17 00:00:00 2001 From: Fabian Thielen Date: Sun, 26 Feb 2017 19:57:54 +0100 Subject: [PATCH] Script gefixt --- install.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 51a4fd2..b1d8e60 100755 --- a/install.sh +++ b/install.sh @@ -1,3 +1,5 @@ +#!/bin/bash + lowercase(){ echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" } @@ -6,9 +8,9 @@ OS=`lowercase \`uname\`` KERNEL=`uname -r` MACH=`uname -m` -if [ "{$OS}" == "windowsnt" ]; then +if [ "$OS" == "windowsnt" ]; then OS=windows -elif [ "{$OS}" == "darwin" ]; then +elif [ "$OS" == "darwin" ]; then OS=mac else OS=`uname` @@ -54,13 +56,13 @@ else fi -if [ "{$DIST}" == "Fedora" ]; then +if [ "$DIST" == "Fedora" ]; then dnf install gcc gcc-c++ autoconf automake make perl -y -elif [ "{$DIST}" == "Ubuntu" ] || [ "${DistroBasedOn}" == "debian" ]; then +elif [ "$DIST" == "Ubuntu" ] || [ "$DistroBasedOn" == "debian" ]; then apt-get install gcc g++ autoconf automake make perl -y -elif [ "{$DIST}" == "CentOS" ]; then +elif [ "$DIST" == "CentOS" ]; then yum install gcc gcc-c++ autoconf automake make perl -y -elif [ "${DistroBasedOn}" == "suse" ]; then +elif [ "$DistroBasedOn" == "suse" ]; then zypper install -y gcc gcc-c++ autoconf automake make perl fi