#!/bin/sh

ARCH=$(sysctl -n hw.machine)

if [ "$ARCH" == "Power Macintosh" ]; then
  IS64BIT=$(sysctl -n hw.cpu64bit_capable)
  if [ "$IS64BIT" == "1" ]; then
    ARCH=ppc64
  else
    ARCH=ppc
  fi
fi

echo $ARCH
