Fix finding templates when earlier dirs don't exist.

This commit is contained in:
Andrew Johnson
2008-08-29 21:03:36 +00:00
parent 5f816f93a4
commit a2d252bc24

View File

@@ -189,8 +189,8 @@ sub get_commandline_opts { #no args
$top =~s|^\$\(EPICS_BASE\)|$epics_base|;
$top =~s|^\$\(TOP\)/||;
}
$top = $ENV{EPICS_MBA_TEMPLATE_TOP} unless $top; # third choice is env var
$top = $epics_base . "/templates/makeBaseApp/top" unless $top; # final
$top = $ENV{EPICS_MBA_TEMPLATE_TOP} unless $top && -d $top; # third choice is env var
$top = $epics_base . "/templates/makeBaseApp/top" unless $top && -d $top; # final
$top and -d "$top" or Cleanup(1, "Can't find template top directory");
$app_template_top = LocalPath($top);
$app_template_top =~s|^\.\.|\$(TOP)/..|;