summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1997-05-08 15:50:29 +0000
committertholo <tholo@openbsd.org>1997-05-08 15:50:29 +0000
commitefcf96063214f3ee565732c9f8c1d0a18ea4aa44 (patch)
tree91c3679b204341a94b8f8bf587e45201514b5519
parentDon't try to copy disktab.shadow if it does not exist (diff)
downloadwireguard-openbsd-efcf96063214f3ee565732c9f8c1d0a18ea4aa44.tar.xz
wireguard-openbsd-efcf96063214f3ee565732c9f8c1d0a18ea4aa44.zip
Properly deal with multiple link targets on a single line
-rw-r--r--distrib/i386/floppies/list2sh.awk14
1 files changed, 9 insertions, 5 deletions
diff --git a/distrib/i386/floppies/list2sh.awk b/distrib/i386/floppies/list2sh.awk
index 8b1f02e1459..59a2e5bdaf8 100644
--- a/distrib/i386/floppies/list2sh.awk
+++ b/distrib/i386/floppies/list2sh.awk
@@ -1,4 +1,4 @@
-# $OpenBSD: list2sh.awk,v 1.4 1997/05/08 04:56:00 tholo Exp $
+# $OpenBSD: list2sh.awk,v 1.5 1997/05/08 15:50:29 tholo Exp $
BEGIN {
printf("cd ${CURDIR}\n");
@@ -16,14 +16,18 @@ $1 == "COPY" {
}
$1 == "LINK" {
printf("echo '%s'\n", $0);
- printf("rm -f ${TARGDIR}/%s\n", $3);
- printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
+ for (i = 3; i <= NF; i++) {
+ printf("rm -f ${TARGDIR}/%s\n", $i);
+ printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $i);
+ }
next;
}
$1 == "SYMLINK" {
printf("echo '%s'\n", $0);
- printf("rm -f ${TARGDIR}/%s\n", $3);
- printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
+ for (i = 3; i <= NF; i++) {
+ printf("rm -f ${TARGDIR}/%s\n", $i);
+ printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $i);
+ }
next;
}
$1 == "ARGVLINK" {