]> gitweb.fluxo.info Git - scripts.git/commitdiff
Minor fixes at weather-query
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 19 Jul 2015 16:38:54 +0000 (13:38 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 19 Jul 2015 16:38:54 +0000 (13:38 -0300)
weather-query

index e925342576bd53bcb23259e8df15343d23133f2d..f8344157722d2175de3c719cef51673c122d1738 100755 (executable)
@@ -19,13 +19,13 @@ function weather_query {
 
   # Save the previous forecast
   cp $CACHE/weather.cur $CACHE/weather.prev
-  weather $* > $CACHE/weather.cur
+  weather $* > $CACHE/weather.cur 2> /dev/null
 
   # Test if current forecast is empty, meaning
   # that we're probably ofline. In that case
   # we provide the previous output.
   if [ ! -s "$CACHE/weather.cur" ]; then
-    cp $CACHE/weather.pre $CACHE/weather.cur
+    cp $CACHE/weather.prev $CACHE/weather.cur
   fi
 
   # Display output