diff --git a/README.md b/README.md index 6435ba6b..2cb7cd07 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ shell脚本的说明 Available commands: ./goecs.sh env Check and Install package: + sudo (Almost all unix-like systems have it.) tar (Almost all unix-like systems have it.) unzip (Almost all unix-like systems have it.) dd (Almost all unix-like systems have it.) @@ -83,6 +84,7 @@ Available commands: sysbench (Almost all unix-like systems can be installed through the system's package manager.) geekbench (geekbench5)(Only support IPV4 environment, and memory greater than 1GB network detection, only support amd64 and arm64 architecture.) speedtest (Use the officially provided binaries for more accurate test results.) + ping (Use the officially provided binaries for more accurate test results.) In fact, sysbench/geekbench is the only one of the above dependencies that must be installed, without which the CPU score cannot be tested. ./goecs.sh install Install goecs command ./goecs.sh upgrade Upgrade goecs command diff --git a/goecs.sh b/goecs.sh index 566ae766..627f8dd1 100644 --- a/goecs.sh +++ b/goecs.sh @@ -304,6 +304,11 @@ env_check() { echo "rm -rf /usr/bin/speedtest-go" _blue "to uninstall speedtest and speedtest-go" fi + if ! command -v ping >/dev/null 2>&1; then + _green "Installing ping" + ${PACKAGE_INSTALL[int]} iputils-ping >/dev/null 2>&1 + ${PACKAGE_INSTALL[int]} ping >/dev/null 2>&1 + fi if [ "$(uname -s)" = "Darwin" ]; then echo "Detected MacOS. Installing sysbench and fio..." brew install --force sysbench fio dd @@ -335,6 +340,7 @@ Available commands: sysbench (Almost all unix-like systems can be installed through the system's package manager.) geekbench (geekbench5)(Only support IPV4 environment, and memory greater than 1GB network detection, only support amd64 and arm64 architecture.) speedtest (Use the officially provided binaries for more accurate test results.) + ping (Use the officially provided binaries for more accurate test results.) In fact, sysbench/geekbench is the only one of the above dependencies that must be installed, without which the CPU score cannot be tested. ./goecs.sh install Install goecs command ./goecs.sh upgrade Upgrade goecs command