From 55b0ec02e45fbfd1ec86de78ceeccd2fb5a07fd0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 14 Feb 2013 16:25:13 -0200 Subject: Syncing with 0.5 release --- brweather/bin/seasons | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'brweather/bin/seasons') diff --git a/brweather/bin/seasons b/brweather/bin/seasons index 4bf5949..2b500f3 100644 --- a/brweather/bin/seasons +++ b/brweather/bin/seasons @@ -6,31 +6,28 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - YEAR=`date +%Y` -DATA1=`date +%d` +DATA0=`date +%d` ##Outono -OUTD=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f2 -d'#'` -OUTH=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f3 -d'#'` +OUTD=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f2 -d'#'` +OUTH=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f3 -d'#'` ##Inverno -INVD=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f4 -d'#'` -INVH=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f5 -d'#'` +INVD=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f4 -d'#'` +INVH=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f5 -d'#'` ##Primavera -PRID=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f6 -d'#'` -PRIH=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f7 -d'#'` +PRID=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f6 -d'#'` +PRIH=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f7 -d'#'` ##Verão -VERD=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f8 -d'#'` -VERH=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f9 -d'#'` +VERD=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f8 -d'#'` +VERH=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f9 -d'#'` ##Funções function MAR(){ -DATA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f2 -d'#' | cut -f1 -d' '` +DATA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f2 -d'#' | cut -f1 -d' '` HORA0=`date +%R | sed s/://g` -HORA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f3 -d'#' | sed s/://g` +HORA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f3 -d'#' | sed s/://g` if [ $DATA0 -lt $DATA1 ] then SEASON1="Ver" @@ -128,9 +125,9 @@ fi } function JUN(){ -DATA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f4 -d'#' | cut -f1 -d' '` +DATA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f4 -d'#' | cut -f1 -d' '` HORA0=`date +%R | sed s/://g` -HORA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f5 -d'#' | sed s/://g` +HORA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f5 -d'#' | sed s/://g` if [ $DATA0 -lt $DATA1 ] then SEASON1="Out" @@ -228,9 +225,9 @@ fi } function SET(){ -DATA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f6 -d'#' | cut -f1 -d' '` +DATA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f6 -d'#' | cut -f1 -d' '` HORA0=`date +%R | sed s/://g` -HORA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f7 -d'#' | sed s/://g` +HORA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f7 -d'#' | sed s/://g` if [ $DATA0 -lt $DATA1 ] then SEASON1="Inv" @@ -328,9 +325,9 @@ fi } function DEZ(){ -DATA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f8 -d'#' | cut -f1 -d' '` +DATA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f8 -d'#' | cut -f1 -d' '` HORA0=`date +%R | sed s/://g` -HORA1=`cat $DIRNAME/brweather/doc/seasons | grep $YEAR | cut -f9 -d'#' | sed s/://g` +HORA1=`cat /opt/brweather/doc/seasons | grep $YEAR | cut -f9 -d'#' | sed s/://g` if [ $DATA0 -lt $DATA1 ] then SEASON1="Pri" -- cgit v1.2.3