Import Upstream version 1.8.5
[hcoop/debian/openafs.git] / src / packaging / MacOS / universal.sh
CommitLineData
805e021f
CE
1#!/bin/sh
2
3if [ -z "$1" ]; then
4 echo Usage: universal topdir
5 exit 1
6fi
7
8BINDEST=`cd $1 && pwd`
9CURDIR=`pwd`
10majorvers=`uname -r | sed 's/\..*//'`
11
12DIRLIST="root.server/usr/afs/bin bin etc lib root.client/usr/vice/etc/afsd root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs"
13mkdir $CURDIR/u_darwin_80
14
15(cd $BINDEST/ppc_darwin_80; tar cf - .)|(cd $CURDIR/u_darwin_80; tar xf -)
16(cd $BINDEST/x86_darwin_80; tar cf - .)|(cd $CURDIR/u_darwin_80; tar xf -)
17
18for d in $DIRLIST; do
19 for f in `cd $CURDIR/u_darwin_80/dest && find $d -type f -print`; do
20 /bin/rm -f $CURDIR/u_darwin_80/dest/$f
21 lipo $BINDEST/ppc_darwin_80/dest/$f $BINDEST/x86_darwin_80/dest/$f -create -output $CURDIR/u_darwin_80/dest/$f
22 done
23done