root/WiredServer/trunk/package.sh

Revision 5175, 1.6 kB (checked in by morris, 7 months ago)

Also chmod PreferencePanes/?

  • Property svn:executable set to *
  • Property svn:keywords set to Id Rev
Line 
1 #!/bin/sh
2
3 BUILDDIR="$1"
4 INSTALLDIR="$2"
5
6 # Create skeleton directories
7 mkdir -p "$INSTALLDIR/Library/PreferencePanes"
8 mkdir -p "$INSTALLDIR/Library/StartupItems"
9 mkdir -p "$INSTALLDIR/Library/Wired"
10
11 # Build a universal wired installation
12 for i in $ARCHS; do
13         WIRED_BINARIES="$BUILDDIR/run/$i/wired/wired $WIRED_BINARIES"
14         MASTER="$i"
15 done
16
17 cp "$BUILDDIR/run/$MASTER/wired/wired" "/tmp/wired.$MASTER"
18 lipo -create $WIRED_BINARIES -output "/tmp/wired.universal" || exit 1
19 cp "/tmp/wired.universal" "$BUILDDIR/run/$MASTER/wired/wired"
20
21 # Install wired into /Library/Wired
22 sudo make -f "$BUILDDIR/make/$MASTER/Makefile" install-only || exit 1
23
24 # Restore thin binary
25 cp "/tmp/wired.$MASTER" "$BUILDDIR/run/$MASTER/wired/wired"
26
27 # Install /Library/PreferencePanes and /Library/StartupItems
28 cd "$SRCROOT"
29 cp -Rp "$BUILT_PRODUCTS_DIR/Wired.prefPane" "$INSTALLDIR/Library/PreferencePanes/"
30 cp -Rp "StartupItems/Wired" "$INSTALLDIR/Library/StartupItems/"
31
32 # Fix permissions
33 sudo chmod 1775 "$INSTALLDIR"
34 sudo chown root:wheel "$INSTALLDIR"
35
36 sudo chmod 775 "$INSTALLDIR/Library"
37 sudo chown root:admin "$INSTALLDIR/Library"
38
39 find "$INSTALLDIR/Library/PreferencePanes" \( -type d -o -perm +111 \) -print0 | sudo xargs -0 chmod 775
40 find "$INSTALLDIR/Library/PreferencePanes" \( -type f -a ! -perm +111 \) -print0 | sudo xargs -0 chmod 664
41 sudo chmod 775 "$INSTALLDIR/Library/PreferencePanes"
42 sudo chown -R root:admin "$INSTALLDIR/Library/PreferencePanes"
43
44 sudo chown -R root:wheel "$INSTALLDIR/Library/StartupItems"
45
46 sudo chmod 755 "$INSTALLDIR/usr" "$INSTALLDIR/usr/local"
47 sudo chown root:wheel "$INSTALLDIR/usr" "$INSTALLDIR/usr/local"
48
49 exit 0
Note: See TracBrowser for help on using the browser.