]> git.saurik.com Git - apple/copyfile.git/blame - xcodescripts/install_files.sh
copyfile-103.tar.gz
[apple/copyfile.git] / xcodescripts / install_files.sh
CommitLineData
3c5890b1
A
1#!/bin/sh
2set -e -x
3
11f767b3
A
4# check if we're building for the simulator
5if [ "${RC_ProjectName%_Sim}" != "${RC_ProjectName}" ] ; then
6 if [ -d ${DSTROOT}${SDKROOT}/usr/lib/system ] ; then
7 for lib in ${DSTROOT}${SDKROOT}/usr/lib/system/*.dylib ; do
8 install_name_tool -id "${lib#${DSTROOT}${SDKROOT}}" "${lib}"
9 done
10 fi
11 exit 0
12fi
13
3c5890b1 14# don't install files for installhdrs or simulator builds
11f767b3 15if [ "$ACTION" == "installhdrs" -o ] ; then
3c5890b1
A
16 exit 0
17fi
18
19function InstallManPages() {
20 for MANPAGE in "$@"; do
21 SECTION=`basename "${MANPAGE/*./}"`
22 MANDIR="$DSTROOT"/usr/share/man/man"$SECTION"
23 install -d -o "$INSTALL_OWNER" -g "$INSTALL_GROUP" -m 0755 "$MANDIR"
24 install -o "$INSTALL_OWNER" -g "$INSTALL_GROUP" -m 0444 "$MANPAGE" "$MANDIR"
25 done
26}
27
28function LinkManPages() {
29 MANPAGE=`basename "$1"`
30 SECTION=`basename "${MANPAGE/*./}"`
31 MANDIR="$DSTROOT"/usr/share/man/man"$SECTION"
32 shift
33 for LINK in "$@"; do
34 ln -hf "$MANDIR/$MANPAGE" "$MANDIR/$LINK"
35 done
36}
37
38InstallManPages copyfile.3
39LinkManPages copyfile.3 \
40 fcopyfile.3 \
41 copyfile_state_alloc.3 \
42 copyfile_state_free.3 \
43 copyfile_state_get.3 \
44 copyfile_state_set.3