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:
2014-03-01 09:04:56 +01:00
parent bbb8908c16
commit 11bab4dff7
25 changed files with 97 additions and 25 deletions
+3 -1
View File
@@ -34,7 +34,9 @@ SUBDIR= add_route arp ash at backup btrace \
worldstone updateboot update_bootcfg \
atnormalize dosread fdisk loadfont \
autopart part partition playwave \
recwave repartition screendump
recwave repartition screendump \
command echo expr false getopts read test true \
umask wait
.if ${MACHINE_ARCH} == "earm"
SUBDIR+= eepromread
-13
View File
@@ -2,17 +2,4 @@ SCRIPTS= cd.sh
BINDIR= /bin
MAN=
LINKS+= ${BINDIR}/cd ${BINDIR}/[
LINKS+= ${BINDIR}/cd ${BINDIR}/command
LINKS+= ${BINDIR}/cd ${BINDIR}/echo
LINKS+= ${BINDIR}/cd ${BINDIR}/expr
LINKS+= ${BINDIR}/cd ${BINDIR}/false
LINKS+= ${BINDIR}/cd ${BINDIR}/getopts
LINKS+= ${BINDIR}/cd ${BINDIR}/read
LINKS+= ${BINDIR}/cd ${BINDIR}/test
LINKS+= ${BINDIR}/cd ${BINDIR}/true
LINKS+= ${BINDIR}/cd ${BINDIR}/umask
LINKS+= ${BINDIR}/cd ${BINDIR}/wait
.include <bsd.prog.mk>
-11
View File
@@ -1,11 +0,0 @@
#!/bin/sh
#
# cd 1.3 - equivalents for normally builtin commands. Author: Kees J. Bot
case $0 in
*/*) command="`expr "$0" : '.*/\(.*\)'`"
;;
*) command="$0"
esac
"$command" "$@"
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= command.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= echo.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= expr.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= false.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= getopts.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= read.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+22
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.
+11
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" "$@"
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= test.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= true.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= umask.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh
+5
View File
@@ -0,0 +1,5 @@
SCRIPTS= wait.sh
BINDIR= /bin
MAN=
.include <bsd.prog.mk>
+1
View File
@@ -0,0 +1 @@
../shared/builtin.sh