mirror of
https://github.com/teddysun/across.git
synced 2025-01-18 13:59:35 +08:00
Update check system
This commit is contained in:
parent
0ee1583790
commit
0d441330c1
10
unixbench.sh
10
unixbench.sh
@ -7,14 +7,14 @@
|
||||
|
||||
# Check System
|
||||
[[ $EUID -ne 0 ]] && echo 'Error: This script must be run as root!' && exit 1
|
||||
egrep -i "centos" /etc/issue && os='centos'
|
||||
egrep -i "debian" /etc/issue && os='debian'
|
||||
egrep -i "ubuntu" /etc/issue && os='ubuntu'
|
||||
[ "$os" == '' ] && echo 'Error: Your system is not supported to run it!' && exit 1
|
||||
[[ -f /etc/redhat-release ]] && os='centos'
|
||||
[[ ! -z "`egrep -i debian /etc/issue`" ]] && os='debian'
|
||||
[[ ! -z "`egrep -i ubuntu /etc/issue`" ]] && os='ubuntu'
|
||||
[[ "$os" == '' ]] && echo 'Error: Your system is not supported to run it!' && exit 1
|
||||
|
||||
# Install necessary libaries
|
||||
if [ "$os" == 'centos' ]; then
|
||||
yum -y install make automake gcc gcc-c autoconf gcc-c++ time perl-Time-HiRes
|
||||
yum -y install make automake gcc autoconf gcc-c++ time perl-Time-HiRes
|
||||
else
|
||||
apt-get -y update
|
||||
apt-get -y install make automake gcc autoconf time perl
|
||||
|
Loading…
x
Reference in New Issue
Block a user