comparison 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
comparison
equal deleted inserted replaced
314:067b5c116a3b 315:2b2f0ba33262
1 #!/bin/bash
2 app=EasyMercurial.app
3 if [ ! -d "$app.carbon" ] || [ ! -d "$app.cocoa" ]; then
4 echo Carbon or Cocoa bundle not found
5 exit 1
6 fi
7 (cd "$app.cocoa" ; find . -type f -print) | while read f; do
8 d=$(dirname "$f")
9 mkdir -p "$app.output/$d"
10 case $(file "$app.cocoa/$f") in
11 *x86_64*)
12 lipo "$app.cocoa/$f" -extract x86_64 -output "/tmp/$$.x86_64"
13 case $(file "$app.carbon/$f") in
14 *x86_64*)
15 lipo "$app.carbon/$f" -remove x86_64 -output "/tmp/$$.rest"
16 ;;
17 *)
18 cp "$app.carbon/$f" "/tmp/$$.rest"
19 ;;
20 esac
21 lipo "/tmp/$$.x86_64" "/tmp/$$.rest" -create -output "$app.output/$f"
22 rm "/tmp/$$".*
23 ;;
24 *)
25 cp "$app.cocoa/$f" "$app.output/$f"
26 ;;
27 esac
28 done
29
30