]> git.saurik.com Git - apple/syslog.git/blob - syslogd.tproj/after_install.sh
syslog-217.1.4.tar.gz
[apple/syslog.git] / syslogd.tproj / after_install.sh
1 #! /bin/bash
2 set -e
3
4 if [ "${RC_ProjectName%_Sim}" != "${RC_ProjectName}" ] ; then
5 DESTDIR="${DSTROOT}${SDKROOT}"/System/Library/LaunchDaemons
6 PLIST="${SRCROOT}"/syslogd.tproj/com.apple.syslogd_sim.plist
7 else
8 DESTDIR="${DSTROOT}"/System/Library/LaunchDaemons
9 PLIST="${SRCROOT}"/syslogd.tproj/com.apple.syslogd.plist
10 fi
11
12 install -d -m 0755 -o root -g wheel "${DESTDIR}"
13 install -m 0644 -o root -g wheel "${PLIST}" "${DESTDIR}"/com.apple.syslogd.plist
14 plutil -convert binary1 "${DESTDIR}"/com.apple.syslogd.plist
15
16 if [ "${RC_ProjectName%_Sim}" != "${RC_ProjectName}" ] ; then
17 exit 0
18 fi
19
20 install -d -m 0755 -o root -g wheel "$DSTROOT"/private/var/log/asl
21
22 PRODUCT=$(xcodebuild -sdk "${SDKROOT}" -version PlatformPath | head -1 | sed 's,^.*/\([^/]*\)\.platform$,\1,')
23
24 if [ ${SDKROOT}x = x ]; then
25 PRODUCT=MacOSX
26 fi
27
28 if [ ${PRODUCT}x = x ]; then
29 PRODUCT=MacOSX
30 fi
31
32 if [ ${PRODUCT} = iPhone ]; then
33 install -d -m 0755 -o root -g wheel "$DSTROOT"/usr/share/sandbox
34 install -m 0644 -o root -g wheel "$SRCROOT"/syslogd.tproj/syslogd.sb "$DSTROOT"/usr/share/sandbox
35 fi