gopher tests: use sws and adjusted to more standard style

This commit is contained in:
Daniel Stenberg 2010-08-25 00:47:45 +02:00
parent 6ed72fd7fa
commit ecb3fe63d7
6 changed files with 56 additions and 36 deletions

View file

@ -42,6 +42,7 @@ my $pidfile; # http server pid file
my $logfile; # http server log file
my $srcdir;
my $fork;
my $gopher = 0;
my $flags = "";
my $path = '.';
@ -72,6 +73,9 @@ while(@ARGV) {
elsif($ARGV[0] eq '--ipv6') {
$ipvnum = 6;
}
elsif($ARGV[0] eq '--gopher') {
$gopher = 1;
}
elsif($ARGV[0] eq '--port') {
if($ARGV[1] =~ /^(\d+)$/) {
$port = $1;
@ -106,6 +110,7 @@ if(!$logfile) {
$logfile = server_logfilename($logdir, $proto, $ipvnum, $idnum);
}
$flags .= "--gopher " if($gopher);
$flags .= "--fork " if(defined($fork));
$flags .= "--pidfile \"$pidfile\" --logfile \"$logfile\" ";
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";