mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	优化编译脚本
This commit is contained in:
		@@ -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}
 | 
			
		||||
@@ -56,8 +58,11 @@ function build() {
 | 
			
		||||
 | 
			
		||||
	# we support TOA on linux only
 | 
			
		||||
	if [ "$OS" == "linux" ] && [ -f "${ROOT}/edge-toa/edge-toa-${ARCH}" ]
 | 
			
		||||
	then
 | 
			
		||||
		if [ ! -d  "$DIST/edge-toa" ]
 | 
			
		||||
		then
 | 
			
		||||
			mkdir "$DIST/edge-toa"
 | 
			
		||||
		fi
 | 
			
		||||
		cp "${ROOT}/edge-toa/edge-toa-${ARCH}" "$DIST/edge-toa/edge-toa"
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user