diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-08-23 02:37:03 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-08-23 02:37:03 +0000 |
commit | e93bfdc3ad4dee4ca16dcaab98741f4075fc1ccb (patch) | |
tree | 9b7e626c7dd5b017a20481f5a3be6e96421b8c3a /distrib | |
parent | a03c2b25617897aa3d87c9563ce4c1566eb8f553 (diff) |
Expand regular expressions used in sed invocations in SPECIAL lines to
find and delete more comments from scripts put on floppy images.
Now, leading whitespace and no trailing characters are both detected
and either cause the comment line to be deleted.
Fix list2sh.awk so that the tabs in the sed statements are not lost
during script creation. Previously the remainder of the SPECIAL line,
i.e. the shell statement to write, was recreated from the fields, but
awk treated the <blank><tab> in the sed expression as a field
separator and discarded the blank and tab. The blank was then added
back in the recreation process, but the tab was lost.
These changes cause the scripts to shrink by a total of 6596
characters.
This handles the i386 cases, other architectures can probably be fixed
the same way.
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/i386/floppies/common/list | 12 | ||||
-rw-r--r-- | distrib/i386/floppies/list2sh.awk | 6 | ||||
-rw-r--r-- | distrib/i386/floppies/ramdiskC/list | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/distrib/i386/floppies/common/list b/distrib/i386/floppies/common/list index 3b4a3eae66c..7b5691dd4d4 100644 --- a/distrib/i386/floppies/common/list +++ b/distrib/i386/floppies/common/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.20 2001/06/23 19:44:42 deraadt Exp $ +# $OpenBSD: list,v 1.21 2001/08/23 02:37:02 krw Exp $ # copy the crunched binary, link to it, and kill it COPY ${OBJDIR}/instbin instbin @@ -82,9 +82,9 @@ COPY ${CURDIR}/../common/termcap.vt usr/share/misc/termcap #COPY ${DESTDIR}/usr/share/misc/scsi_modes usr/share/misc/scsi_modes # and the installation tools -SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../common/dot.profile > .profile -SPECIAL sed -e '/^#[ ].*$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${CURDIR}/../common/install.md > install.md -SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../../../miniroot/upgrade.sh > upgrade -SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../../../miniroot/install.sh > install -SPECIAL sed -e '/^#[ ].*$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../../miniroot/install.sub > install.sub +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../common/dot.profile > .profile +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${CURDIR}/../common/install.md > install.md +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../../miniroot/upgrade.sh > upgrade +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../../miniroot/install.sh > install +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../../miniroot/install.sub > install.sub SPECIAL chmod 755 install upgrade diff --git a/distrib/i386/floppies/list2sh.awk b/distrib/i386/floppies/list2sh.awk index 59a2e5bdaf8..9b8a0dc562e 100644 --- a/distrib/i386/floppies/list2sh.awk +++ b/distrib/i386/floppies/list2sh.awk @@ -1,4 +1,4 @@ -# $OpenBSD: list2sh.awk,v 1.5 1997/05/08 15:50:29 tholo Exp $ +# $OpenBSD: list2sh.awk,v 1.6 2001/08/23 02:37:02 krw Exp $ BEGIN { printf("cd ${CURDIR}\n"); @@ -53,8 +53,8 @@ $1 == "COPYDIR" { $1 == "SPECIAL" { printf("echo '%s'\n", $0); printf("(cd ${TARGDIR};"); - for (i = 2; i <= NF; i++) - printf(" %s", $i); + sub(/^[ \t]*SPECIAL[ \t]*/, ""); + printf(" %s", $0); printf(")\n"); next; } diff --git a/distrib/i386/floppies/ramdiskC/list b/distrib/i386/floppies/ramdiskC/list index 206e6bb38fa..0ef65bae4e7 100644 --- a/distrib/i386/floppies/ramdiskC/list +++ b/distrib/i386/floppies/ramdiskC/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.4 2001/08/17 13:58:21 krw Exp $ +# $OpenBSD: list,v 1.5 2001/08/23 02:37:02 krw Exp $ # copy the crunched binary, link to it, and kill it COPY ${OBJDIR}/instbin instbin @@ -84,9 +84,9 @@ COPY ${CURDIR}/../common/termcap.vt usr/share/misc/termcap #COPY ${DESTDIR}/usr/share/misc/scsi_modes usr/share/misc/scsi_modes # and the installation tools -SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../common/dot.profile > .profile -SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../common/install.md > install.md -SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../../../miniroot/upgrade.sh > upgrade -SPECIAL sed -e '/^#[ ].*$/d' < ${CURDIR}/../../../miniroot/install.sh > install -SPECIAL sed -e '/^#[ ].*$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../../miniroot/install.sub > install.sub +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../common/dot.profile > .profile +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "s/^ARCH=ARCH$/ARCH=`arch -s`/" < ${CURDIR}/../common/install.md > install.md +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../../miniroot/upgrade.sh > upgrade +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' < ${CURDIR}/../../../miniroot/install.sh > install +SPECIAL sed -e '/^[ ]*#[ ].*$/d' -e '/^[ ]*#$/d' -e "/^VERSION=/s/=.*/=${REV}/" < ${CURDIR}/../../../miniroot/install.sub > install.sub SPECIAL chmod 755 install upgrade |