Skip to content

Commit

Permalink
Auto-detect TARGET_OS for mac in make-adopt-build-farm.sh (#2874)
Browse files Browse the repository at this point in the history
* Auto-detect TARGET_OS for mac in make-adopt-build-farm.sh

Signed-off-by: Stewart X Addison <[email protected]>
  • Loading branch information
sxa authored Apr 6, 2022
1 parent f2d259d commit 3bc4f22
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build-farm/make-adopt-build-farm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ if [ -z "$ARCHITECTURE" ]; then
ARCHITECTURE=$(uname -p)
if [ "$OSTYPE" = "cygwin" ]; then ARCHITECTURE=$(uname -m); fi # Windows
if [ "$ARCHITECTURE" = "x86_64" ]; then ARCHITECTURE=x64; fi # Linux/x64
if [ "$ARCHITECTURE" = "i386" ]; then ARCHITECTURE=x64; fi # Solaris/x64
if [ "$ARCHITECTURE" = "i386" ]; then ARCHITECTURE=x64; fi # Solaris/x64 and mac/x64
if [ "$ARCHITECTURE" = "sparc" ]; then ARCHITECTURE=sparcv9; fi # Solaris/SPARC
if [ "$ARCHITECTURE" = "powerpc" ]; then ARCHITECTURE=ppc64; fi # AIX
if [ "$ARCHITECTURE" = "arm" ]; then ARCHITECTURE=aarch64; fi # mac/aarch64
if [ "$ARCHITECTURE" = "armv7l" ]; then ARCHITECTURE=arm; fi # Linux/arm32
echo ARCHITECTURE not defined - assuming $ARCHITECTURE
export ARCHITECTURE
Expand All @@ -39,8 +40,9 @@ fi
## so needs to be special cased - on everthing else "uname" is valid
if [ -z "$TARGET_OS" ]; then
TARGET_OS=$(uname)
if [ "$OSTYPE" = "cygwin" ]; then TARGET_OS=windows ; fi
if [ "$OSTYPE" = "SunOS" ]; then TARGET_OS=solaris ; fi
if [ "$OSTYPE" = "cygwin" ]; then TARGET_OS=windows ; fi
if [ "$TARGET_OS" = "SunOS" ]; then TARGET_OS=solaris ; fi
if [ "$TARGET_OS" = "Darwin" ]; then TARGET_OS=mac ; fi
echo TARGET_OS not defined - assuming you want "$TARGET_OS"
export TARGET_OS
fi
Expand Down

0 comments on commit 3bc4f22

Please sign in to comment.