mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-13 01:58:27 +08:00
root检测
This commit is contained in:
parent
b14caecc18
commit
622bff338c
@ -1,4 +1,10 @@
|
||||
#!/bin/bash
|
||||
if [[ `whoami` != `root` ]]; then
|
||||
echo 请以 root 权限运行
|
||||
echo 按任意键退出
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
PCArch=`dpkg --print-architecture`
|
||||
if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
|
||||
echo 非 ARM 架构,无法继续
|
||||
@ -8,7 +14,7 @@ if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
|
||||
fi
|
||||
if [[ -f /etc/apt/sources.list.d/box86.list ]]; then
|
||||
echo 已安装,结束
|
||||
echo 按任意键退出
|
||||
echo 按回车键退出
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
@ -24,5 +30,5 @@ fi
|
||||
echo " + sudo apt update"
|
||||
sudo apt update
|
||||
sudo apt install -y $installBox
|
||||
echo 安装完成!
|
||||
echo 安装完成!按回车键退出
|
||||
read
|
Loading…
Reference in New Issue
Block a user