From 0d0085187f80598e5edaa30fd681727d0a3d9686 Mon Sep 17 00:00:00 2001 From: shenmo Date: Fri, 3 Nov 2023 12:19:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=9E=84=E5=BB=BA=E5=A4=9A?= =?UTF-8?q?=E7=A7=8D=E6=9E=B6=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/build-container.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/build-container.sh b/src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/build-container.sh index 8bcd880..e225db2 100755 --- a/src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/build-container.sh +++ b/src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/build-container.sh @@ -3,9 +3,19 @@ if [ `which debootstrap` = "" ];then echo "Need to install debootstrap!" exit fi +if [ "$1" = "amd64" ] || [ "$1" = "x64" ];then +ARCH="amd64" +ARCH_ANOTHERWAY="x64" +elif [ "$1" = "arm64" ] || [ "$1" = "arm" ];then +ARCH="arm64" +ARCH_ANOTHERWAY="arm64" +else +echo "Invalid architecture! Exit" +exit 1 +fi cd "`dirname $0`" -sudo debootstrap bookworm ./bookworm-env https://mirrors.ustc.edu.cn/debian/ +sudo debootstrap --arch=`${ARCH}` bookworm ./bookworm-env https://mirrors.ustc.edu.cn/debian/ sudo chown -R `whoami` ./bookworm-env rm -rf bookworm-env/var/cache/apt/archives/*.deb tar -I 'xz -T0' -cvf bookworm-env.tar.xz bookworm-env/*