|
|
@ -18,18 +18,21 @@ if [ "$EUID" -ne 0 ] |
|
|
|
exit |
|
|
|
exit |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then |
|
|
|
if grep -Eq "Ubuntu" /etc/*-release; then |
|
|
|
ln -sf /bin/bash /bin/sh |
|
|
|
ln -sf /bin/bash /bin/sh |
|
|
|
#sudo dpkg-reconfigure dash |
|
|
|
#sudo dpkg-reconfigure dash |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then |
|
|
|
if grep -Eq "Debian" /etc/*-release; then |
|
|
|
ln -sf /bin/bash /bin/sh |
|
|
|
ln -sf /bin/bash /bin/sh |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${_os} == "Darwin" ]; then |
|
|
|
if [ ${_os} == "Darwin" ]; then |
|
|
|
OSNAME='macos' |
|
|
|
OSNAME='macos' |
|
|
|
|
|
|
|
elif grep -Eq "openSUSE" /etc/*-release; then |
|
|
|
|
|
|
|
OSNAME='opensuse' |
|
|
|
|
|
|
|
zypper refresh |
|
|
|
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then |
|
|
|
elif grep -Eqi "CentOS" /etc/issue || grep -Eq "CentOS" /etc/*-release; then |
|
|
|
OSNAME='centos' |
|
|
|
OSNAME='centos' |
|
|
|
yum install -y wget zip unzip |
|
|
|
yum install -y wget zip unzip |
|
|
@ -47,12 +50,9 @@ elif grep -Eqi "Debian" /etc/issue || grep -Eq "Debian" /etc/*-release; then |
|
|
|
apt update -y |
|
|
|
apt update -y |
|
|
|
apt install -y devscripts |
|
|
|
apt install -y devscripts |
|
|
|
apt install -y wget zip unzip |
|
|
|
apt install -y wget zip unzip |
|
|
|
apt install -y wget zip unzip |
|
|
|
|
|
|
|
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then |
|
|
|
elif grep -Eqi "Ubuntu" /etc/issue || grep -Eq "Ubuntu" /etc/*-release; then |
|
|
|
OSNAME='ubuntu' |
|
|
|
OSNAME='ubuntu' |
|
|
|
apt install -y wget zip unzip |
|
|
|
apt install -y wget zip unzip |
|
|
|
elif grep -Eqi "Raspbian" /etc/issue || grep -Eq "Raspbian" /etc/*-release; then |
|
|
|
|
|
|
|
OSNAME='raspbian' |
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
OSNAME='unknow' |
|
|
|
OSNAME='unknow' |
|
|
|
fi |
|
|
|
fi |
|
|
|