annotate deploy/osx/combine.sh @ 315:2b2f0ba33262

More Mac build material
author Chris Cannam
date Tue, 01 Mar 2011 16:50:06 +0000
parents
children aa852b477e4d
rev   line source
Chris@315 1 #!/bin/bash
Chris@315 2 app=EasyMercurial.app
Chris@315 3 if [ ! -d "$app.carbon" ] || [ ! -d "$app.cocoa" ]; then
Chris@315 4 echo Carbon or Cocoa bundle not found
Chris@315 5 exit 1
Chris@315 6 fi
Chris@315 7 (cd "$app.cocoa" ; find . -type f -print) | while read f; do
Chris@315 8 d=$(dirname "$f")
Chris@315 9 mkdir -p "$app.output/$d"
Chris@315 10 case $(file "$app.cocoa/$f") in
Chris@315 11 *x86_64*)
Chris@315 12 lipo "$app.cocoa/$f" -extract x86_64 -output "/tmp/$$.x86_64"
Chris@315 13 case $(file "$app.carbon/$f") in
Chris@315 14 *x86_64*)
Chris@315 15 lipo "$app.carbon/$f" -remove x86_64 -output "/tmp/$$.rest"
Chris@315 16 ;;
Chris@315 17 *)
Chris@315 18 cp "$app.carbon/$f" "/tmp/$$.rest"
Chris@315 19 ;;
Chris@315 20 esac
Chris@315 21 lipo "/tmp/$$.x86_64" "/tmp/$$.rest" -create -output "$app.output/$f"
Chris@315 22 rm "/tmp/$$".*
Chris@315 23 ;;
Chris@315 24 *)
Chris@315 25 cp "$app.cocoa/$f" "$app.output/$f"
Chris@315 26 ;;
Chris@315 27 esac
Chris@315 28 done
Chris@315 29
Chris@315 30