summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-25 21:57:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-04-25 21:57:44 +0000
commitc8f604ec16bc24026f85fc30815021424e2ddbe1 (patch)
tree7c6038c221ff113edaea26593feb7c0d6bf8799c /distrib
parent4b2f72f96343bf4fc1183096207bedcd7c0993e6 (diff)
merge in changes from other list2sh.awk files
Diffstat (limited to 'distrib')
-rw-r--r--distrib/miniroot/list2sh.awk8
1 files changed, 4 insertions, 4 deletions
diff --git a/distrib/miniroot/list2sh.awk b/distrib/miniroot/list2sh.awk
index a501924c55b..bfc2ba8a699 100644
--- a/distrib/miniroot/list2sh.awk
+++ b/distrib/miniroot/list2sh.awk
@@ -1,4 +1,4 @@
-# $OpenBSD: list2sh.awk,v 1.5 1997/05/05 16:31:36 grr Exp $
+# $OpenBSD: list2sh.awk,v 1.6 2002/04/25 21:57:43 deraadt Exp $
# $NetBSD: list2sh.awk,v 1.2 1996/05/04 15:45:31 pk Exp $
BEGIN {
@@ -11,14 +11,14 @@ BEGIN {
}
$1 == "COPY" {
printf("echo '%s'\n", $0);
- printf("rm -f ${TARGDIR}/%s\n", $3);
+ printf("test -f ${TARGDIR}/%s && rm -fr ${TARGDIR}/%s\n", $3, $3);
printf("cp %s ${TARGDIR}/%s\n", $2, $3);
next;
}
$1 == "LINK" {
printf("echo '%s'\n", $0);
for (i = 3; i <= NF; i++) {
- printf("rm -f ${TARGDIR}/%s\n", $i);
+ printf("test -f ${TARGDIR}/%s && rm -f ${TARGDIR}/%s\n", $i, $i);
printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $i);
}
next;
@@ -26,7 +26,7 @@ $1 == "LINK" {
$1 == "SYMLINK" {
printf("echo '%s'\n", $0);
for (i = 3; i <= NF; i++) {
- printf("rm -f ${TARGDIR}/%s\n", $i);
+ printf("test -f ${TARGDIR}/%s && rm -f ${TARGDIR}/%s\n", $i, $i);
printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $i);
}
next;