更新 build.sh

Signed-off-by: zhao <zj18139624826@gmail.com>
This commit is contained in:
zhao 2025-06-20 18:41:46 +08:00
parent 6076d359fc
commit edf8eaba11

View File

@ -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
#####################################
# 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"