chiark / gitweb /
catacomb-import-update: Prepare for out-of-tree builds
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 31 Dec 2019 13:35:58 +0000 (13:35 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 1 Jan 2020 23:48:14 +0000 (23:48 +0000)
The input directory should be relative to $0, not to `.'.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
catacomb-import-update

index de96ca9625766d088247e62b997128621a513568..792e86cf4b50cde0b37b3e52435da13dc6cc900d 100755 (executable)
@@ -879,7 +879,8 @@ die "usage: $PROG --import|--convert\n"
 $DOCONVERT = $1 eq 'convert';
 
 if ($DOCONVERT) {
-  $DONOR_DIR = $DONOR_IMPORT_DIR;
+  $DONOR_DIR = $0;
+  $DONOR_DIR =~ s{[^/]+$}{$DONOR_IMPORT_DIR} or die "$0 ?";
 } else {
   $DONOR_DIR = "../catacomb";
 }