annotate deploy/osx/combine.sh @ 568:eb65dd31d293

Rename icon in wxs file
author Chris Cannam <chris.cannam@eecs.qmul.ac.uk>
date Wed, 29 Feb 2012 14:54:59 +0000
parents aa852b477e4d
children
rev   line source
Chris@315 1 #!/bin/bash
Chris@335 2 app=EasyMercurial
Chris@335 3 if [ ! -d "$app.carbon.app" ] || [ ! -d "$app.cocoa.app" ]; then
Chris@315 4 echo Carbon or Cocoa bundle not found
Chris@315 5 exit 1
Chris@315 6 fi
Chris@335 7 (cd "$app.cocoa.app" ; find . -type f -print) | while read f; do
Chris@315 8 d=$(dirname "$f")
Chris@335 9 mkdir -p "$app.app/$d"
Chris@335 10 case $(file "$app.cocoa.app/$f") in
Chris@335 11 *universal*x86_64*)
Chris@335 12 lipo "$app.cocoa.app/$f" -extract x86_64 -output "/tmp/$$.x86_64";;
Chris@315 13 *x86_64*)
Chris@335 14 lipo "$app.cocoa.app/$f" -create -output "/tmp/$$.x86_64";;
Chris@335 15 *)
Chris@335 16 cp "$app.cocoa.app/$f" "$app.app/$f"
Chris@335 17 continue;;
Chris@335 18 esac
Chris@335 19 case $(file "$app.carbon.app/$f") in
Chris@335 20 *x86_64*)
Chris@335 21 lipo "$app.carbon.app/$f" -remove x86_64 -output "/tmp/$$.rest"
Chris@335 22 ;;
Chris@335 23 *universal*)
Chris@335 24 cp "$app.carbon.app/$f" "/tmp/$$.rest"
Chris@315 25 ;;
Chris@315 26 *)
Chris@335 27 lipo "$app.carbon.app/$f" -create -output "/tmp/$$.rest"
Chris@315 28 ;;
Chris@315 29 esac
Chris@335 30 lipo "/tmp/$$.x86_64" "/tmp/$$.rest" -create -output "$app.app/$f"
Chris@335 31 rm "/tmp/$$".*
Chris@315 32 done
Chris@315 33
Chris@315 34