update: sudo check first

This commit is contained in:
sjlleo
2022-05-23 09:45:59 +08:00
committed by GitHub
parent 5ff461af42
commit 982e1064c2

View File

@@ -1,5 +1,9 @@
#!/bin/bash
checkRootPermit() {
[[ $EUID -ne 0 ]] && echo "请使用sudo/root权限运行本脚本" && exit 1
}
checkSystemArch() {
arch=$(uname -m)
if [[ $arch == "x86_64" ]]; then