With newer bash, this causes
local envvar="FREEBSD_${arch^^}_BUILDJOB"
if [ -n "${!envvar}" ]; then
to (properly) report a syntax error.
As Roger says, it is better to print a dummy host for each
architecture, so do that.
Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
my $o;
if ($ENV{'OSSTEST_HOSTSLIST_DUMMY'}) {
- $o .= "SOMEHOST";
- if (@arches) {
- $o .= " $kernels[0]";
- $o .= " {".join(',',@arches)."}";
+ foreach my $arch (@arches ? @arches : qw(SOMEARCH)) {
+ $o .= "SOMEHOST";
+ $o .= "-\U$arch" if @arches;
+ if (@arches) {
+ $o .= " $kernels[0]";
+ $o .= " $arch";
+ }
+ if (@suites) {
+ $o .= " $suites[0]";
+ }
+ $o .= "\n";
}
- if (@suites) {
- $o .= " $suites[0]";
- }
- $o .= "\n";
print $o or die $!;
exit 0;
}