From 7534af09ed3d99adad2530463e99898e2744e1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 23 Aug 2023 18:21:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BC=96=E8=AF=91=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build/build.sh b/build/build.sh index 92670e0..b85072e 100755 --- a/build/build.sh +++ b/build/build.sh @@ -6,8 +6,10 @@ function build() { VERSION=$(lookup-version "$ROOT"/../internal/const/const.go) DIST=$ROOT/"../dist/${NAME}" MUSL_DIR="/usr/local/opt/musl-cross/bin" - GCC_X86_64_DIR="/usr/local/Cellar/x86_64-unknown-linux-gnu/10.3.0/bin" - GCC_ARM64_DIR="/usr/local/Cellar/aarch64-unknown-linux-gnu/10.3.0/bin" + + # for macOS users: precompiled gcc can be downloaded from https://github.com/messense/homebrew-macos-cross-toolchains + GCC_X86_64_DIR="/usr/local/gcc/x86_64-unknown-linux-gnu/bin" + GCC_ARM64_DIR="//usr/local/gcc/aarch64-unknown-linux-gnu/bin" OS=${1} ARCH=${2} @@ -57,7 +59,10 @@ function build() { # we support TOA on linux only if [ "$OS" == "linux" ] && [ -f "${ROOT}/edge-toa/edge-toa-${ARCH}" ] then - mkdir "$DIST/edge-toa" + if [ ! -d "$DIST/edge-toa" ] + then + mkdir "$DIST/edge-toa" + fi cp "${ROOT}/edge-toa/edge-toa-${ARCH}" "$DIST/edge-toa/edge-toa" fi