3 # This script is used to create package directory tree used
4 # by PackageMaker in OS X.
9 RESOURCE=$PWD/build/osxpack
10 if ! [ -d $RESOURCE ]; then
11 echo "Your tree seems to be missing $RESOURCE." >&2
14 if [ "x$PREFIX" == "x" ]; then
15 PREFIX=/home/cfs/package
18 if [ "x$STAGE" == "x" ]; then
19 STAGE=/System/Library/Extensions
22 if ! [ -d $STAGE/llite.kext ]; then
23 echo "Sorry, cannot find stage files for package"
27 if ! [ -d $PREFIX ]; then
31 if ! [ -d $PREFIX/Install_resources ]; then
32 mkdir -p $PREFIX/Install_resources
35 if ! [ -d $PREFIX/Package_contents ]; then
36 mkdir -p $PREFIX/Package_contents
39 CONTENTS=$PREFIX/Package_contents
41 if ! [ -d $CONTENTS/System/Libraray/Extensions ]; then
42 mkdir -p $CONTENTS/System/Library/Extensions
45 # /etc is symlink of /private/etc in OS X, if we
46 # just use $CONTENTS/etc, it will OVERWRITE /etc in
47 # installation target, that means all files in /etc
48 # will be lost, the system will be corrupted.
49 if ! [ -d $CONTENTS/private/etc ]; then
50 mkdir -p $CONTENTS/private/etc
53 if ! [ -d $CONTENTS/sbin ]; then
54 mkdir -p $CONTENTS/sbin
57 cp -f $RESOURCE/*.txt $PREFIX/Install_resources/
58 cp -f $RESOURCE/*flight $PREFIX/Install_resources/
59 cp -f $RESOURCE/sysctl.conf $CONTENTS/private/etc
60 cp -f $RESOURCE/uninstall_lustre $CONTENTS/sbin
61 cp -f $RESOURCE/unload_lustre $CONTENTS/sbin
62 cp -rf $STAGE/llite.kext $CONTENTS/System/Library/Extensions
63 cp -rf $STAGE/mdc.kext $CONTENTS/System/Library/Extensions
64 cp -rf $STAGE/lov.kext $CONTENTS/System/Library/Extensions
65 cp -rf $STAGE/osc.kext $CONTENTS/System/Library/Extensions
66 cp -rf $STAGE/ptlrpc.kext $CONTENTS/System/Library/Extensions
67 cp -rf $STAGE/ptlrpcs.kext $CONTENTS/System/Library/Extensions
68 cp -rf $STAGE/obdclass.kext $CONTENTS/System/Library/Extensions
69 cp -rf $STAGE/lvfs.kext $CONTENTS/System/Library/Extensions
70 cp -rf $STAGE/ksocknal.kext $CONTENTS/System/Library/Extensions
71 cp -rf $STAGE/portals.kext $CONTENTS/System/Library/Extensions
72 cp -rf $STAGE/libcfs.kext $CONTENTS/System/Library/Extensions