Update kvm.sh
This commit is contained in:
parent
c916a7ad90
commit
b655b88a65
@ -7,6 +7,7 @@ greenline() { echo -e "\033[32m\033[01m $1\033[0m"; }
|
||||
yellow() { echo -e "\033[33m\033[01m[NOTICE] $1\033[0m"; }
|
||||
blue() { echo -e "\033[34m\033[01m[MESSAGE] $1\033[0m"; }
|
||||
light_magenta() { echo -e "\033[95m\033[01m[NOTICE] $1\033[0m"; }
|
||||
magenta() { echo -e "\033[95m\033[01m $1\033[0m"; }
|
||||
highlight() { echo -e "\033[32m\033[01m$1\033[0m"; }
|
||||
cyan() { echo -e "\033[38;2;0;255;255m$1\033[0m"; }
|
||||
|
||||
@ -368,10 +369,10 @@ update_scripts() {
|
||||
check_cpu_architecture() {
|
||||
ARCH=$(uname -m)
|
||||
if [[ "$ARCH" == "x86_64" ]]; then
|
||||
light_magenta " 当前CPU型号:$(grep -m 1 "model name" /proc/cpuinfo | awk -F ': ' '{print $2}')"
|
||||
magenta " 当前CPU型号:$(grep -m 1 "model name" /proc/cpuinfo | awk -F ': ' '{print $2}')"
|
||||
elif [[ "$ARCH" == "aarch64" || "$ARCH" == "armv7l" ]]; then
|
||||
if [[ -f /proc/device-tree/model ]]; then
|
||||
light_magenta " 当前ARM机型:$(cat /proc/device-tree/model | tr -d '\0')"
|
||||
magenta " 当前ARM机型:$(cat /proc/device-tree/model | tr -d '\0')"
|
||||
else
|
||||
echo -e " Board model information not available."
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user