]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Set $builddir to invocation dir if it is not specified by other means
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 22 Jul 2014 07:21:26 +0000 (09:21 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 22 Jul 2014 07:21:26 +0000 (09:21 +0200)
This fixes undefined variable in --tftp handling when novaboot it run as

  novabot ... -- /dev/null

novaboot

index 4119409c72004f71d523eac3c494fabbe25f4306..0a88f693b055aed3e3a824100f476df81ff58e6d 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -740,6 +740,8 @@ $builddir ||= dirname(File::Spec->rel2abs( ${$scripts[0]}{filename})) if scalar
 if (defined $builddir) {
     chdir($builddir) or die "Can't change directory to $builddir: $!";
     print "novaboot: Entering directory `$builddir'\n";
+} else {
+    $builddir = $invocation_dir;
 }
 
 ## File generation phase