scripts/build.sh
zhao edf8eaba11 更新 build.sh
Signed-off-by: zhao <zj18139624826@gmail.com>
2025-06-20 18:41:46 +08:00

48 lines
923 B
Bash

#!/bin/bash -e
export RED_COLOR='\e[1;31m'
export GREEN_COLOR='\e[1;32m'
export YELLOW_COLOR='\e[1;33m'
export BLUE_COLOR='\e[1;34m'
export PINK_COLOR='\e[1;35m'
export SHAN='\e[1;33;5m'
export RES='\e[0m'
GROUP=
group() {
endgroup
echo "::group:: $1"
GROUP=1
}
endgroup() {
if [ -n "$GROUP" ]; then
echo "::endgroup::"
fi
GROUP=
}
#####################################
# 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"