build.sh: Check whether the host is 64-bit
Abort right away if the user tries to build on a box that does not appear to be 64-bit. Change-Id: If71685c238c8e1690fd50fee9b4151f803305a81
This commit is contained in:
parent
849d84766b
commit
60c934e0e8
7
build.sh
7
build.sh
|
@ -19,6 +19,13 @@ CLR_BLD_CYA=$CLR_RST$CLR_BLD$(tput setaf 6) # cyan, bold
|
|||
echo -e '\0033\0143'
|
||||
clear
|
||||
|
||||
# Make sure we are running on 64-bit before carrying on with anything
|
||||
ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
|
||||
if [ "$ARCH" != "64" ]; then
|
||||
echo -e "${CLR_BLD_RED}error: unsupported arch (expected: 64, found: $ARCH)${CLR_RST}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set up paths
|
||||
cd $(dirname $0)
|
||||
DIR_ROOT=$(pwd)
|
||||
|
|
Loading…
Reference in New Issue