Make fast-update use curl when curl is present (bug 193789), r=seawood@netscape.com, sr=alecf@netscape.com

This commit is contained in:
jkeiser%netscape.com 2003-03-14 21:20:40 +00:00
Родитель 883a8e9d26
Коммит 5fbb03ffd6
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -113,7 +113,6 @@ print "within the $rootdir directory..\n" if ($rootdir);
# this is my lame way of checking if a command succeeded AND getting
# output from it. I'd love a better way. -alecf@netscape.com
my $have_checkins = 0;
@args = ("wget", "--quiet", "--output-document=-", "\"$url\"");
open CHECKINS,"wget --quiet --output-document=- \"$url\"|" or
die "Error opening wget: $!\n";
@ -126,6 +125,13 @@ if (!$have_checkins) {
$header = <CHECKINS> and $have_checkins = 1;
}
if (!$have_checkins) {
open CHECKINS, "curl -s '$url'|" or die "Error opening curl $!\n";
$header = <CHECKINS> and $have_checkins = 1;
}
$have_checkins || die "Couldn't get checkins\n";
open REALOUT, ">.fast-update.bonsai.html" || die "argh $!\n";