From edf8eaba118395ac0c2929bdd3c3b83ce9f443c9 Mon Sep 17 00:00:00 2001 From: zhao Date: Fri, 20 Jun 2025 18:41:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20build.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- build.sh | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index 85b5bb3..7d57107 100644 --- a/build.sh +++ b/build.sh @@ -20,9 +20,28 @@ endgroup() { GROUP= } -# check -if [ "$(whoami)" != "zhiern" ] && [ -z "$git_name" ] && [ -z "$git_password" ]; then - echo -e "\n${RED_COLOR} Not authorized. Execute the following command to provide authorization information:${RES}\n" - echo -e "${BLUE_COLOR} export git_name=your_username git_password=your_password${RES}\n" - exit 1 -fi \ No newline at end of file +##################################### +# OpenWrt Build Script # +##################################### + +# 脚本URL +export mirror=https://script.kejizero.online + +# 私有Gitea +export gitea=git.kejizero.online/zhao + +# GitHub镜像 +export github="github.com" + +# Start time +starttime=`date +'%Y-%m-%d %H:%M:%S'` +CURRENT_DATE=$(date +%s) + +# Cpus +cores=`expr $(nproc --all) + 1` + +# platform +[ "$2" = "rockchip" ] && export platform="rockchip" toolchain_arch="aarch64_generic" +[ "$2" = "x86_64" ] && export platform="x86_64" toolchain_arch="x86_64" + +