aboutsummaryrefslogtreecommitdiffstats
path: root/shell_cmds/xcodescripts
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-09 14:20:58 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-09 14:20:58 -0400
commit5fd83771641d15c418f747bd343ba6738d3875f7 (patch)
tree5abf0f78f680d9837dbd93d4d4c3933bb7509599 /shell_cmds/xcodescripts
downloadapple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.gz
apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.zst
apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.zip
Import macOS userland
adv_cmds-176 basic_cmds-55 bootstrap_cmds-116.100.1 developer_cmds-66 diskdev_cmds-667.40.1 doc_cmds-53.60.1 file_cmds-321.40.3 mail_cmds-35 misc_cmds-34 network_cmds-606.40.1 patch_cmds-17 remote_cmds-63 shell_cmds-216.60.1 system_cmds-880.60.2 text_cmds-106
Diffstat (limited to 'shell_cmds/xcodescripts')
-rw-r--r--shell_cmds/xcodescripts/builtins-manpages.txt85
-rw-r--r--shell_cmds/xcodescripts/builtins.txt14
-rw-r--r--shell_cmds/xcodescripts/install-files.sh66
3 files changed, 165 insertions, 0 deletions
diff --git a/shell_cmds/xcodescripts/builtins-manpages.txt b/shell_cmds/xcodescripts/builtins-manpages.txt
new file mode 100644
index 0000000..ffc6f4e
--- /dev/null
+++ b/shell_cmds/xcodescripts/builtins-manpages.txt
@@ -0,0 +1,85 @@
+alias.1
+alloc.1
+bg.1
+bind.1
+bindkey.1
+break.1
+breaksw.1
+builtins.1
+case.1
+cd.1
+chdir.1
+command.1
+complete.1
+continue.1
+default.1
+dirs.1
+do.1
+done.1
+echotc.1
+elif.1
+else.1
+end.1
+endif.1
+endsw.1
+esac.1
+eval.1
+exec.1
+exit.1
+export.1
+fc.1
+fg.1
+fi.1
+filetest.1
+for.1
+foreach.1
+getopts.1
+glob.1
+goto.1
+hash.1
+hashstat.1
+history.1
+hup.1
+if.1
+jobid.1
+jobs.1
+limit.1
+logout.1
+ls-F.1
+notify.1
+onintr.1
+popd.1
+pushd.1
+read.1
+readonly.1
+rehash.1
+repeat.1
+return.1
+sched.1
+set.1
+setenv.1
+settc.1
+setty.1
+setvar.1
+shift.1
+source.1
+stop.1
+suspend.1
+switch.1
+telltc.1
+then.1
+times.1
+trap.1
+type.1
+ulimit.1
+umask.1
+unalias.1
+uncomplete.1
+unhash.1
+unlimit.1
+unset.1
+unsetenv.1
+until.1
+wait.1
+where.1
+while.1
diff --git a/shell_cmds/xcodescripts/builtins.txt b/shell_cmds/xcodescripts/builtins.txt
new file mode 100644
index 0000000..55cb408
--- /dev/null
+++ b/shell_cmds/xcodescripts/builtins.txt
@@ -0,0 +1,14 @@
+bg
+cd
+command
+fc
+fg
+getopts
+hash
+jobs
+read
+type
+ulimit
+umask
+unalias
+wait
diff --git a/shell_cmds/xcodescripts/install-files.sh b/shell_cmds/xcodescripts/install-files.sh
new file mode 100644
index 0000000..3710fcb
--- /dev/null
+++ b/shell_cmds/xcodescripts/install-files.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+set -e -x
+
+BINDIR="$DSTROOT"/usr/bin
+LIBEXECDIR="$DSTROOT"/usr/libexec
+MANDIR="$DSTROOT"/usr/share/man
+PAMDIR="$DSTROOT"/private/etc/pam.d
+
+ln -f "$BINDIR/hexdump" "$BINDIR/od"
+ln -f "$BINDIR/id" "$BINDIR/groups"
+ln -f "$BINDIR/id" "$BINDIR/whoami"
+ln -f "$BINDIR/w" "$BINDIR/uptime"
+ln -f "$DSTROOT/bin/test" "$DSTROOT/bin/["
+
+install -d -o root -g wheel -m 0755 "$BINDIR"
+install -d -o root -g wheel -m 0755 "$MANDIR"/man1
+install -d -o root -g wheel -m 0755 "$MANDIR"/man8
+
+install -c -o root -g wheel -m 0755 "$SRCROOT"/alias/generic.sh "$BINDIR"/alias
+install -c -o root -g wheel -m 0644 "$SRCROOT"/alias/builtin.1 "$MANDIR"/man1
+
+set +x
+for builtin in `cat "$SRCROOT/xcodescripts/builtins.txt"`; do
+ echo ... linking $builtin
+ ln -f "$BINDIR"/alias "$BINDIR/$builtin"
+done
+
+for manpage in `cat "$SRCROOT/xcodescripts/builtins-manpages.txt"`; do
+ echo ... linking $manpage
+ echo ".so man1/builtin.1" > "$MANDIR/man1/$manpage"
+done
+set -x
+
+install -d -o root -g wheel -m 0755 "$DSTROOT"/AppleInternal/Tests/shell_cmds
+install -o root -g wheel -m 0644 "$SRCROOT"/tests/regress.m4 \
+ "$DSTROOT"/AppleInternal/Tests/shell_cmds
+
+install -d -o root -g wheel -m 0755 \
+ "$DSTROOT"/AppleInternal/Tests/shell_cmds/time
+install -o root -g wheel -m 0644 "$SRCROOT"/time/tests/test_time.sh \
+ "$DSTROOT"/AppleInternal/Tests/shell_cmds/time
+
+install -d -o root -g wheel -m 0755 \
+ "$DSTROOT"/AppleInternal/CoreOS/BATS/unit_tests
+install -o root -g wheel -m 0644 "$SRCROOT"/tests/shell_cmds.plist \
+ "$DSTROOT"/AppleInternal/CoreOS/BATS/unit_tests
+
+# Skip locate and su targets for iOS
+if [ "$TARGET_NAME" = "All_iOS" ]; then
+ exit 0
+fi
+
+install -d -o root -g wheel -m 0755 "$LIBEXECDIR"
+install -c -o root -g wheel -m 0755 "$SRCROOT"/locate/locate/updatedb.sh \
+ "$LIBEXECDIR"/locate.updatedb
+install -c -o root -g wheel -m 0644 "$SRCROOT"/locate/locate/locate.updatedb.8 \
+ "$MANDIR"/man8
+install -c -o root -g wheel -m 0755 "$SRCROOT"/locate/locate/concatdb.sh \
+ "$LIBEXECDIR"/locate.concatdb
+echo ".so man8/locate.updatedb.8" > "$MANDIR"/man8/locate.concatdb.8
+install -c -o root -g wheel -m 0755 "$SRCROOT"/locate/locate/mklocatedb.sh \
+ "$LIBEXECDIR"/locate.mklocatedb
+echo ".so man8/locate.updatedb.8" > "$MANDIR"/man8/locate.mklocatedb.8
+
+install -d -o root -g wheel -m 0755 "$PAMDIR"
+install -c -o root -g wheel -m 0644 "$SRCROOT"/su/su.pam "$PAMDIR"/su