This diff contains minor changes to make the build scripts in here
compatible with https://github.com/bassosimone/monorepo.
See 5e4c797380
		
	
			
		
			
				
	
	
		
			31 lines
		
	
	
		
			572 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			572 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
set -euo pipefail
 | 
						|
 | 
						|
nocheck=0
 | 
						|
if [[ $# -eq 1 && $1 == "--no-check" ]]; then
 | 
						|
	nocheck=1
 | 
						|
fi
 | 
						|
 | 
						|
GOOS=$(go env GOOS)
 | 
						|
case $GOOS in
 | 
						|
linux)
 | 
						|
	__sdk_dir=$HOME/Android/Sdk
 | 
						|
	;;
 | 
						|
darwin)
 | 
						|
	__sdk_dir=$HOME/Library/Android/sdk
 | 
						|
	;;
 | 
						|
*)
 | 
						|
	echo "FATAL: unsupported operating system" 1>&2
 | 
						|
	exit 1
 | 
						|
	;;
 | 
						|
esac
 | 
						|
 | 
						|
ANDROID_HOME=${ANDROID_HOME:-$__sdk_dir}
 | 
						|
if [[ $nocheck == 0 && ! -d $ANDROID_HOME ]]; then
 | 
						|
	echo "FATAL: expected to find android SDK at $ANDROID_HOME, but found nothing" 1>&2
 | 
						|
	echo "HINT: run ./MOBILE/android/setup to (re)install the SDK" 1>&2
 | 
						|
	exit 1
 | 
						|
fi
 | 
						|
echo $ANDROID_HOME
 |