]> git.cameronkatri.com Git - apple_cmds.git/blob - shell_cmds/xcodescripts/install-files.sh
file_cmds: Fix ipcs
[apple_cmds.git] / shell_cmds / xcodescripts / install-files.sh
1 #!/bin/sh
2 set -e -x
3
4 BINDIR="$DSTROOT"/usr/bin
5 LIBEXECDIR="$DSTROOT"/usr/libexec
6 MANDIR="$DSTROOT"/usr/share/man
7 PAMDIR="$DSTROOT"/private/etc/pam.d
8
9 ln -f "$BINDIR/hexdump" "$BINDIR/od"
10 ln -f "$BINDIR/id" "$BINDIR/groups"
11 ln -f "$BINDIR/id" "$BINDIR/whoami"
12 ln -f "$BINDIR/w" "$BINDIR/uptime"
13 ln -f "$DSTROOT/bin/test" "$DSTROOT/bin/["
14
15 install -d -o root -g wheel -m 0755 "$BINDIR"
16 install -d -o root -g wheel -m 0755 "$MANDIR"/man1
17 install -d -o root -g wheel -m 0755 "$MANDIR"/man8
18
19 install -c -o root -g wheel -m 0755 "$SRCROOT"/alias/generic.sh "$BINDIR"/alias
20 install -c -o root -g wheel -m 0644 "$SRCROOT"/alias/builtin.1 "$MANDIR"/man1
21
22 set +x
23 for builtin in `cat "$SRCROOT/xcodescripts/builtins.txt"`; do
24 echo ... linking $builtin
25 ln -f "$BINDIR"/alias "$BINDIR/$builtin"
26 done
27
28 for manpage in `cat "$SRCROOT/xcodescripts/builtins-manpages.txt"`; do
29 echo ... linking $manpage
30 echo ".so man1/builtin.1" > "$MANDIR/man1/$manpage"
31 done
32 set -x
33
34 install -d -o root -g wheel -m 0755 "$DSTROOT"/AppleInternal/Tests/shell_cmds
35 install -o root -g wheel -m 0644 "$SRCROOT"/tests/regress.m4 \
36 "$DSTROOT"/AppleInternal/Tests/shell_cmds
37
38 install -d -o root -g wheel -m 0755 \
39 "$DSTROOT"/AppleInternal/Tests/shell_cmds/time
40 install -o root -g wheel -m 0644 "$SRCROOT"/time/tests/test_time.sh \
41 "$DSTROOT"/AppleInternal/Tests/shell_cmds/time
42
43 install -d -o root -g wheel -m 0755 \
44 "$DSTROOT"/AppleInternal/CoreOS/BATS/unit_tests
45 install -o root -g wheel -m 0644 "$SRCROOT"/tests/shell_cmds.plist \
46 "$DSTROOT"/AppleInternal/CoreOS/BATS/unit_tests
47
48 # Skip locate and su targets for iOS
49 if [ "$TARGET_NAME" = "All_iOS" ]; then
50 exit 0
51 fi
52
53 install -d -o root -g wheel -m 0755 "$LIBEXECDIR"
54 install -c -o root -g wheel -m 0755 "$SRCROOT"/locate/locate/updatedb.sh \
55 "$LIBEXECDIR"/locate.updatedb
56 install -c -o root -g wheel -m 0644 "$SRCROOT"/locate/locate/locate.updatedb.8 \
57 "$MANDIR"/man8
58 install -c -o root -g wheel -m 0755 "$SRCROOT"/locate/locate/concatdb.sh \
59 "$LIBEXECDIR"/locate.concatdb
60 echo ".so man8/locate.updatedb.8" > "$MANDIR"/man8/locate.concatdb.8
61 install -c -o root -g wheel -m 0755 "$SRCROOT"/locate/locate/mklocatedb.sh \
62 "$LIBEXECDIR"/locate.mklocatedb
63 echo ".so man8/locate.updatedb.8" > "$MANDIR"/man8/locate.mklocatedb.8
64
65 install -d -o root -g wheel -m 0755 "$PAMDIR"
66 install -c -o root -g wheel -m 0644 "$SRCROOT"/su/su.pam "$PAMDIR"/su