3 if [ $EUID -ne 0 ]; then
4 echo "install script must be run as root" 2>&1
8 ## Copy Libsystem pieces from ~rc
10 ## Install results in /
12 build
=$(sw_vers -buildVersion)
13 train
=$(~rc/bin/getTrainForBuild --quiet "$build")
15 while [ $# -gt 0 ]; do
16 if [ "${1/=*/}" = "--build" ]; then
18 elif [ "$1" = "--noinstall" ]; then
20 elif [ "$1" = "--copylibs" ]; then
23 echo "install: [--build=10A400] [--noinstall] [--copylibs]" 2>&1
29 ROOTS
=/var
/tmp
/GCDRoots.
"$build"
31 # Building for another version implies copylibs and noinstall
32 if [ "$build" != "$(sw_vers -buildVersion)" ]; then
41 ~rc
/bin
/buildit
-arch i386
-arch ppc
-arch x86_64
-arch armv6 \
42 -release "$train" -rootsDirectory "$ROOTS" "$@" .
45 BUILDIT
-project libdispatch
-merge / -noverify
47 if [ $copylibs = 1 ]; then
48 ALTUSRLOCALLIBSYSTEM
="$ROOTS"/system
49 mkdir -p "$ALTUSRLOCALLIBSYSTEM"
50 export ALTUSRLOCALLIBSYSTEM
51 .
/install_Libsystem_pieces
"$build"
52 cp /usr
/local
/lib
/system
/libdispatch
* "$ALTUSRLOCALLIBSYSTEM"
55 LIBSYSTEM
=$(~rc/bin/getvers "$train$build" Libsystem)
56 if [ -z "$LIBSYSTEM" ]; then
59 SRCROOT
="/var/tmp/$LIBSYSTEM"
60 if [ ! -e "$SRCROOT" ]; then
61 cd $(dirname "$SRCROOT")
62 svn co http
://src.apple.com
/svn
/BSD
/Libsystem
/tags
/"$LIBSYSTEM"
67 if [ $noinstall -eq 1 ]; then
71 if [ ! -e /usr
/lib
/libSystem.B.dylib.orig
]; then
72 cp /usr
/lib
/libSystem.B.dylib
/usr
/lib
/libSystem.B.dylib.orig
74 if [ ! -e /usr
/lib
/libSystem.B_debug.dylib.orig
] ; then
75 cp /usr
/lib
/libSystem.B_debug.dylib
/usr
/lib
/libSystem.B_debug.dylib.orig
77 if [ ! -e /usr
/lib
/libSystem.B_profile.dylib.orig
] ; then
78 cp /usr
/lib
/libSystem.B_profile.dylib
/usr
/lib
/libSystem.B_profile.dylib.orig
80 cp -R "$ROOTS"/"$LIBSYSTEM".roots
/"$LIBSYSTEM"~sym
/libSystem
* /usr
/lib
/
81 update_dyld_shared_cache