Ticket #45794: get_arch.sh

File get_arch.sh, 214 bytes (added by fhgwright (Fred Wright), 10 years ago)

Script to get correct machine architecture

Line 
1#!/bin/sh
2
3ARCH=$(sysctl -n hw.machine)
4
5if [ "$ARCH" == "Power Macintosh" ]; then
6  IS64BIT=$(sysctl -n hw.cpu64bit_capable)
7  if [ "$IS64BIT" == "1" ]; then
8    ARCH=ppc64
9  else
10    ARCH=ppc
11  fi
12fi
13
14echo $ARCH