mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 07:50:25 +08:00 
			
		
		
		
	
		
			
	
	
		
			17 lines
		
	
	
		
			324 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			324 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| 
								 | 
							
								#!/usr/bin/env bash
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								OS="${1}"
							 | 
						||
| 
								 | 
							
								ARCH="${2}"
							 | 
						||
| 
								 | 
							
								TAG="${3}"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								if [ -z "$OS" ]; then
							 | 
						||
| 
								 | 
							
									echo "usage: build.sh OS ARCH"
							 | 
						||
| 
								 | 
							
									exit
							 | 
						||
| 
								 | 
							
								fi
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								if [ -z "$ARCH" ]; then
							 | 
						||
| 
								 | 
							
									echo "usage: build.sh OS ARCH"
							 | 
						||
| 
								 | 
							
									exit
							 | 
						||
| 
								 | 
							
								fi
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								env GOOS=linux GOARCH="${ARCH}" go build -tags="${TAG}" -trimpath -ldflags="-s -w" -o "standalone-instance-installer-${OS}-${ARCH}" main.go
							 |