diff --git a/scripts/build.sh b/scripts/build.sh index 8c4d6d3..5ded31f 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -21,10 +21,11 @@ function Init() { function Help() { echo "-h: help" echo "-t: test build only" + echo "-T: targets file path or targets string" } function ParseArgs() { - while getopts "ht" arg; do + while getopts "htT:" arg; do case $arg in h) Help @@ -33,6 +34,9 @@ function ParseArgs() { t) TEST_BUILD_ONLY="1" ;; + T) + TARGETS_FILE="$OPTARG" + ;; ?) echo "unkonw argument" exit 1 @@ -43,7 +47,8 @@ function ParseArgs() { function Build() { TARGET="$1" - make TARGET=${TARGET} GCC_VER="11.4.0" \ + make TARGET=${TARGET} \ + GCC_VER="11.4.0" \ MUSL_VER="1.2.4" \ BINUTILS_VER="2.41" \ GMP_VER="6.3.0" \ @@ -99,25 +104,35 @@ powerpc64-linux-musl powerpc64le-linux-musl powerpcle-linux-musl powerpcle-linux-muslsf -riscv32-linux-musl riscv64-linux-musl s390x-linux-musl x86_64-linux-musl x86_64-linux-muslx32' function BuildAll() { - # while read line; do - # if [ -z "$line" ] || [ "${line:0:1}" == "#" ]; then - # continue - # fi - # Build "$line" - # done