From ab3e3b40c4e6c4d81dcba31f3f4dab0f7db14743 Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Thu, 21 Feb 2013 22:40:00 +0000 Subject: [PATCH] Added a script to thin out fat binaries git-svn-id: http://comictagger.googlecode.com/svn/trunk@526 6c5673fe-1810-88d6-992b-cd32ca31540c --- mac/make_thin.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 mac/make_thin.sh diff --git a/mac/make_thin.sh b/mac/make_thin.sh new file mode 100755 index 0000000..3112579 --- /dev/null +++ b/mac/make_thin.sh @@ -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