'XSALISTDIR' => "../xsa-lists",
# LATER: Remove these
'NOCHECKOUT' => 0,
+ 'GETLOGS' => 0,
+ 'SMART' => 0,
+ 'DEBUG' => 0,
+ 'HTML' => 0,
);
my %optionspec = (
" --major not specified\n";
}
- # XSADIR SPECIAL CASING?
-
# Normalize Calculate Derived Options
$o{'SHORT'} = $o{'VERSION'}.$o{'MAJOR'}.$o{'SINCE'}."-".$o{'UNTIL'};
$o{'LOGROOT'} = File::Spec->rel2abs($o{'LOGROOT'});
mkdir $o{'LOGROOT'};
}
$o{'LOGDIR'} = $o{'LOGROOT'}."/logs-".$o{'SHORT'};
- $o{'OUTPUTFILE'} = $o{'LOGDIR'}."/".$o{'OUTPUTFILE'};
+ $o{'OUTPUTFILE'} = $o{'LOGROOT'}."/".$o{'SHORT'}."-".$o{'OUTPUTFILE'};
$o{'TMPDIR'} = $o{'LOGDIR'}."/tmp";
+ system("rm -rf ".$o{'TMPDIR'});
+ mkdir $o{'TMPDIR'};
$o{'DEBUGDIR'} = $o{'LOGDIR'}."/debug";
+ system("rm -rf ".$o{'DEBUGDIR'});
+ mkdir $o{'DEBUGDIR'};
$o{'XEN_GIT'} = $o{'LOGDIR'}."/xen";
$o{'QEMUU_GIT'} = $o{'LOGDIR'}."/qemu-xen";
$o{'QEMUT_GIT'} = $o{'LOGDIR'}."/qemu-xen-traditional";
" [--outputfile filename (relative to logdir)]".
# " [--smart] [--debug] [--html]".
# " [--getlogs]".
- " [--xsadir xsadir (default=../xsaweb; files fetched from".
+ " [--xsadir xsadir (default=LOGDIR/tmp/xsaweb; files fetched from".
" http://xenbits.xenproject.org/xsa/)]".
" [--logroot directory]".
" [--xsalistdir directory]".
}
# Calculate extra options
- $o{'XSALISTDIR'} = File::Spec->rel2abs($o{'XSALISTDIR'});
- $o{'XSALISTFILE'} = $o{'XSALISTDIR'}."/".$o{'XSALIST'};
+ $opt{'XSALISTDIR'} = File::Spec->rel2abs($o{'XSALISTDIR'});
+ $opt{'XSALISTFILE'} = $opt{'XSALISTDIR'}."/".$o{'XSALIST'};
+
+ # XSADIR and XSAFETCH SPECIAL CASING
+ if (!$opt{'XSADIR'}) {
+ $opt{'XSAFETCH'} = "https://xenbits.xenproject.org/xsa/";
+ $opt{'XSADIR'} = $o{'TMPDIR'}."/xsaweb";
+ system("rm -rf ".$opt{'XSADIR'});
+ mkdir $o{'TMPDIR'};
+ }
# Check whether files/directories exist
- if (!-d $o{'XSALISTDIR'}) {
+ if (!-d $opt{'XSALISTDIR'}) {
die "Usage: $0".$u."\n".
- " directory ".$o{'XSALISTDIR'}." does not exist.\n";
+ " directory ".$opt{'XSALISTDIR'}." does not exist.\n";
}
- if (!-f $o{'XSALISTFILE'}) {
+ if (!-f $opt{'XSALISTFILE'}) {
die "Usage: $0".$u."\n".
- " file ".$o{'XSALISTFILE'}." does not exist.\n";
+ " file ".$opt{'XSALISTFILE'}." does not exist.\n";
}
return %opt;
my %opt = handleoptions("output_webpage.html", $u);
# Error checking
- if (! defined $o{'XSASTART'}) {
+ if (! defined $opt{'XSASTART'}) {
die "Usage: $0".$u."\n".
" --xsastart not specified\n";
}
# Error checking
- if (! defined $o{'XSAEND'}) {
+ if (! defined $opt{'XSAEND'}) {
die "Usage: $0".$u."\n".
" --xsasend not specified\n";
}