summaryrefslogtreecommitdiff
path: root/bootstrap.conf
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2023-01-14 17:20:35 +0000
committerColin Watson <cjwatson@debian.org>2023-01-14 17:20:35 +0000
commit1f69aec73795779e8d5ef0e9c4dfecb62489043d (patch)
tree76dacecb6e28d93717a8f2943718fe53005b7dc6 /bootstrap.conf
parenteb9458cec093c7c830c1416338acf74f6f29be43 (diff)
Fix bootstrap_epilogue to handle running without --copy
* bootstrap.conf (bootstrap_epilogue): Avoid leaving `docs/INSTALL.autoconf` as a dangling symbolic link if the `--copy` option is not used.
Diffstat (limited to 'bootstrap.conf')
-rw-r--r--bootstrap.conf8
1 files changed, 7 insertions, 1 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index a7c62db6..48b04783 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -153,5 +153,11 @@ bootstrap_post_import_hook () {
}
bootstrap_epilogue () {
- mv INSTALL docs/INSTALL.autoconf
+ # If --copy is not used, then INSTALL may be a symbolic link, in which
+ # case a simple "mv" could leave it pointing to the wrong target. Arrange
+ # (reasonably portably) for the target to end up as a regular file no
+ # matter what.
+ rm -f docs/INSTALL.autoconf
+ cp -Lp INSTALL docs/INSTALL.autoconf
+ rm -f INSTALL
}