summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/alpha/list2sh.awk8
1 files changed, 4 insertions, 4 deletions
diff --git a/distrib/alpha/list2sh.awk b/distrib/alpha/list2sh.awk
index f0176022848..9b9f9b596b0 100644
--- a/distrib/alpha/list2sh.awk
+++ b/distrib/alpha/list2sh.awk
@@ -1,4 +1,4 @@
-# $OpenBSD: list2sh.awk,v 1.2 1997/05/16 01:45:05 millert Exp $
+# $OpenBSD: list2sh.awk,v 1.3 1997/05/16 02:27:10 millert Exp $
BEGIN {
printf("cd ${CURDIR}\n");
@@ -10,14 +10,14 @@ BEGIN {
}
$1 == "COPY" {
printf("echo '%s'\n", $0);
- printf("rm -fr ${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;
@@ -25,7 +25,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;