Added a script to thin out fat binaries

git-svn-id: http://comictagger.googlecode.com/svn/trunk@526 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
beville@gmail.com 2013-02-21 22:40:00 +00:00
parent 188024c2db
commit ab3e3b40c4

21
mac/make_thin.sh Executable file
View File

@ -0,0 +1,21 @@
rm -rf thin
BINFOLDER=$1
LIST=`cd $BINFOLDER; ls Qt* *.so *.dylib Python 2>/dev/null`
for FILE in $LIST
do
ISFAT=`lipo -info $BINFOLDER/$FILE|grep -v Non-fat`
if [ "$ISFAT" != "" ]
then
echo "Fat Binary: $FILE"
mkdir -p thin
lipo -thin i386 -output thin/$FILE $BINFOLDER/$FILE
fi
done
if [ -d thin ]
then
mv thin/* $BINFOLDER
else
echo No files to lipo
fi
rm -rf thin