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
|
#!/bin/bash
|
||||||
|
if [[ `whoami` != `root` ]]; then
|
||||||
|
echo 请以 root 权限运行
|
||||||
|
echo 按任意键退出
|
||||||
|
read
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
PCArch=`dpkg --print-architecture`
|
PCArch=`dpkg --print-architecture`
|
||||||
if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
|
if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
|
||||||
echo 非 ARM 架构,无法继续
|
echo 非 ARM 架构,无法继续
|
||||||
@ -8,7 +14,7 @@ if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
|
|||||||
fi
|
fi
|
||||||
if [[ -f /etc/apt/sources.list.d/box86.list ]]; then
|
if [[ -f /etc/apt/sources.list.d/box86.list ]]; then
|
||||||
echo 已安装,结束
|
echo 已安装,结束
|
||||||
echo 按任意键退出
|
echo 按回车键退出
|
||||||
read
|
read
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -24,5 +30,5 @@ fi
|
|||||||
echo " + sudo apt update"
|
echo " + sudo apt update"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y $installBox
|
sudo apt install -y $installBox
|
||||||
echo 安装完成!
|
echo 安装完成!按回车键退出
|
||||||
read
|
read
|
Loading…
Reference in New Issue
Block a user