Splitting commands/cd/cd.sh

As the situation is right now, importing one of the commands the
script replaces, requires a doc/UPDATING step.

By moving the script to a shared folder, and symlinking it once per
command, this allows for separatly installed files on the system,
instead of one file being symlinked multiple times.

Change-Id: I0dae96982bca5168b852ed70fff61442441b929f
This commit is contained in:
2013-10-03 22:39:47 +02:00
parent bbb8908c16
commit 11bab4dff7
25 changed files with 97 additions and 25 deletions

22
commands/shared/README Normal file
View File

@@ -0,0 +1,22 @@
builtin.sh is installed as a set of tools to stand in for specific
filesystem call to builtin commands.
for example if /bin/test is used, then builtin.sh will be loaded
and simply call the builtin function of the same name.
At this moment it is installed as the following commands:
/bin/[
/bin/command
/bin/echo
/bin/expr
/bin/false
/bin/getopts
/bin/read
/bin/test
/bin/true
/bin/umask
/bin/wait
If one of the following is replaced by the NetBSD equivalent, please
update the list, and remove this completly when it is not anymore
required.

View File

@@ -0,0 +1,11 @@
#!/bin/sh
#
# cd 1.3 - equivalents for normally builtin commands. Author: Kees J. Bot
case $0 in
*/*) command="`expr "$0" : '.*/\(.*\)'`"
;;
*) command="$0"
esac
"$command" "$@"