Skip to content

Instantly share code, notes, and snippets.

@typester
Created July 27, 2010 05:39
Show Gist options
  • Save typester/491799 to your computer and use it in GitHub Desktop.
Save typester/491799 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $# -ne 1 ]; then
echo "require basename";
exit;
fi
TARGET=$1;
cp -R $TARGET-armv6 $TARGET;
filelist=$(find $TARGET -type f | xargs file | sed -e "s,^$TARGET/,,g" | \
grep -E \(Mach-O\)\|\(ar\ archive\) |sed -e 's,:.*,,g' -e '/\for\ architecture/d')
for i in $filelist
do
echo $i
/usr/bin/lipo -create $TARGET/$i $TARGET-armv7/$i -output `basename $i`
mv -f `basename $i` $TARGET/$i
done
for i in $filelist
do
echo $i
/usr/bin/lipo -create $TARGET/$i $TARGET-i386/$i -output `basename $i`
mv -f `basename $i` $TARGET/$i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment