Script gefixt

This commit is contained in:
2017-02-26 19:57:54 +01:00
parent 97d12e08f1
commit 83bcc0f3aa

View File

@@ -1,3 +1,5 @@
#!/bin/bash
lowercase(){ lowercase(){
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
} }
@@ -6,9 +8,9 @@ OS=`lowercase \`uname\``
KERNEL=`uname -r` KERNEL=`uname -r`
MACH=`uname -m` MACH=`uname -m`
if [ "{$OS}" == "windowsnt" ]; then if [ "$OS" == "windowsnt" ]; then
OS=windows OS=windows
elif [ "{$OS}" == "darwin" ]; then elif [ "$OS" == "darwin" ]; then
OS=mac OS=mac
else else
OS=`uname` OS=`uname`
@@ -54,13 +56,13 @@ else
fi fi
if [ "{$DIST}" == "Fedora" ]; then if [ "$DIST" == "Fedora" ]; then
dnf install gcc gcc-c++ autoconf automake make perl -y 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 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 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 zypper install -y gcc gcc-c++ autoconf automake make perl
fi fi