From 74af44a435dced64cfb657e9c3d99a34dd8c2a33 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 14 Feb 2013 19:00:31 -0200 Subject: DIRNAME needs to be set just once --- brweather/bin/inpe-4 | 3 --- brweather/bin/inpe-5 | 3 --- brweather/bin/inpe-6 | 3 --- brweather/bin/moon | 3 --- brweather/bin/open-3 | 3 --- brweather/bin/open-4 | 3 --- brweather/bin/open-5 | 3 --- brweather/bin/seasons | 3 --- 8 files changed, 24 deletions(-) diff --git a/brweather/bin/inpe-4 b/brweather/bin/inpe-4 index 10ecd76..54eaab8 100644 --- a/brweather/bin/inpe-4 +++ b/brweather/bin/inpe-4 @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - NCN=`grep "javascript:janela('http://tempo.cptec.inpe.br/~rtempo/legenda.shtml'" ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.'` NC1=`grep -m1 'title="Clique sobre o ícone para ver a legenda">' ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.'` diff --git a/brweather/bin/inpe-5 b/brweather/bin/inpe-5 index 9e25767..4216e69 100644 --- a/brweather/bin/inpe-5 +++ b/brweather/bin/inpe-5 @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - NC2=`grep -m2 'title="Clique sobre o ícone para ver a legenda">' ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.' | tail -n1` NC3=`grep -m3 'title="Clique sobre o ícone para ver a legenda">' ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.' | tail -n1` NC4=`grep -m4 'title="Clique sobre o ícone para ver a legenda">' ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.' | tail -n1` diff --git a/brweather/bin/inpe-6 b/brweather/bin/inpe-6 index 4946349..6f9503e 100644 --- a/brweather/bin/inpe-6 +++ b/brweather/bin/inpe-6 @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - NC5=`grep -m5 'title="Clique sobre o ícone para ver a legenda">' ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.' | tail -n1` NC6=`grep -m6 'title="Clique sobre o ícone para ver a legenda">' ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.' | tail -n1` NC7=`grep -m7 'title="Clique sobre o ícone para ver a legenda">' ~/.brweather/cache/cache | cut -f12 -d'/' | cut -f1 -d'.' | tail -n1` diff --git a/brweather/bin/moon b/brweather/bin/moon index e79e82e..074d9bd 100755 --- a/brweather/bin/moon +++ b/brweather/bin/moon @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - #Ano atual YEAR=`date "+%Y"` diff --git a/brweather/bin/open-3 b/brweather/bin/open-3 index f542a70..2aa698e 100644 --- a/brweather/bin/open-3 +++ b/brweather/bin/open-3 @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - AWE=$(echo awk -F"[,:]" '{for(i=1;i<=NF;i++){if($i~/id\042/){print$(i+1)}}}') WID=$(awk -F"[,:]" '{for(i=1;i<=NF;i++){if($i~/weather\042/){print$(i+2)}}}' ~/.brweather/cache/open1) diff --git a/brweather/bin/open-4 b/brweather/bin/open-4 index 363748c..8e89715 100644 --- a/brweather/bin/open-4 +++ b/brweather/bin/open-4 @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - AWE=$(echo awk -F"[,:]" '{for(i=1;i<=NF;i++){if($i~/id\042/){print$(i+1)}}}') D2=$(grep -m1 $(date -d "1 day" "+%a") ~/.brweather/cache/open2 | tail -n1) diff --git a/brweather/bin/open-5 b/brweather/bin/open-5 index 998c504..dce32c0 100644 --- a/brweather/bin/open-5 +++ b/brweather/bin/open-5 @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - AWE=$(echo awk -F"[,:]" '{for(i=1;i<=NF;i++){if($i~/id\042/){print$(i+1)}}}') D5=$(grep -m1 $(date -d "4 day" "+%a") ~/.brweather/cache/open2 | tail -n1) diff --git a/brweather/bin/seasons b/brweather/bin/seasons index b4adf4e..4af2a8d 100644 --- a/brweather/bin/seasons +++ b/brweather/bin/seasons @@ -6,9 +6,6 @@ # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 -# Pasta base -DIRNAME="$(dirname `dirname $0`)" - YEAR=`date +%Y` DATA0=`date +%d` -- cgit v1.2.3