#!/bin/bash # # Return error if executable is only PPC # OK () { # echo OK continue } ERROR () { echo ERROR: $1 echo file $1 echo "-------------------" continue } for FILE in $* do # echo -n "Checking $FILE ... " [ -f $FILE ] || OK file $FILE | grep "Mach-O executable" >/dev/null && { file $FILE | grep i386 >/dev/null && OK ERROR $FILE } file $FILE | grep Mach-O >/dev/null && { file $FILE | grep "for architecture i386" >/dev/null && OK ERROR $FILE } OK done