summaryrefslogtreecommitdiff
path: root/x11/wmweather/patches/patch-ab
blob: 7833d5d26c2d613c427ae5509d16dc6f1df7803b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-ab,v 1.2 2001/07/15 14:03:13 jlam Exp $

--- GrabWeather.orig	Fri Apr 16 17:41:53 1999
+++ GrabWeather
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/pkg/bin/perl
 
 #
 #    Grabs the latest local weather conditions from the National Weather Service (NWS).
@@ -38,19 +38,17 @@
 
     $StationID    = $ARGV[0];
     $HTMLFileName = "$StationID.TXT";
+    $FTP          = "ftp -V -r 5";
     $URL          = "ftp://weather.noaa.gov/data/observations/metar/decoded/$HTMLFileName";
     $DataFileName = "$StationID.dat";
 
 
 
 
+    # $FTP must be able to fetch URLs.
     #
-    #  I think some of these wget command line options may cause problems
-    #  for some people? Dont know why... (Perhaps they have a ~/.wgetrc file
-    #  that overrides command line options?).
-    #
-    $GrabCmd = "wget --proxy=off --passive-ftp --tries 0 -q -O $home/.wmWeatherReports/$StationID.TXT $URL";
-    system "$GrabCmd";
+    $GrabCmd = "$FTP -o $home/.wmWeatherReports/$StationID.TXT $URL";
+    system "$GrabCmd 2>/dev/null";