deep-wine-runner/InstallBox86.sh

35 lines
1.0 KiB
Bash
Raw Normal View History

2023-02-28 22:03:31 +08:00
#!/bin/bash
2023-03-04 16:04:09 +08:00
if [[ `whoami` != root ]]; then
2023-03-04 16:03:03 +08:00
echo 请以 root 权限运行
echo 按任意键退出
read
exit 1
fi
2023-03-04 15:59:53 +08:00
PCArch=`dpkg --print-architecture`
if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
2023-02-28 22:03:31 +08:00
echo 非 ARM 架构,无法继续
echo 按任意键退出
read
exit 1
fi
2023-03-04 16:05:15 +08:00
which box86
if [[ $? == 0 ]]; then
2023-02-28 22:03:31 +08:00
echo 已安装,结束
2023-03-04 16:03:03 +08:00
echo 按回车键退出
2023-02-28 22:03:31 +08:00
read
exit 1
fi
#sudo wget https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list
echo deb https://code.gitlink.org.cn/gfdgd_xi/weekly-box86-debs/raw/branch/main/debian / > /etc/apt/sources.list.d/box86.list
echo "adding key..."
wget -qO- https://code.gitlink.org.cn/gfdgd_xi/weekly-box86-debs/raw/branch/main/debian/KEY.gpg | sudo apt-key add -
installBox=box86
2023-03-04 15:59:53 +08:00
if [[ $PCArch == "arm64" ]]; then
2023-02-28 22:03:31 +08:00
installBox="box86 box64"
sudo dpkg --add-architecture armhf
fi
echo " + sudo apt update"
sudo apt update
sudo apt install -y $installBox
2023-03-04 16:03:03 +08:00
echo 安装完成!按回车键退出
2023-02-28 22:03:31 +08:00
read