aboutsummaryrefslogtreecommitdiff
path: root/brweather/bin/seasons
diff options
context:
space:
mode:
Diffstat (limited to 'brweather/bin/seasons')
-rw-r--r--brweather/bin/seasons37
1 files changed, 17 insertions, 20 deletions
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"