Commit 6f205815 authored by Aurélio A. Heckert's avatar Aurélio A. Heckert

Ensure pub_year

parent 2cf5374d
...@@ -73,14 +73,15 @@ download $url $slug.ORIG.html ...@@ -73,14 +73,15 @@ download $url $slug.ORIG.html
if (grep -q 'id="data"' $slug.ORIG.html); then if (grep -q 'id="data"' $slug.ORIG.html); then
eval $(grep 'id="data"' $slug.ORIG.html | eval $(grep 'id="data"' $slug.ORIG.html |
sed -r 's#.*<span id="data">Atualizado em ([0-9]+)( [ae] [0-9]+)? DE ([a-z]+) DE ([0-9]+)( ás ([0-9:]+))?</span>.*#\ sed -r 's#.*<span id="data">Atualizado em ([0-9]+)( [ae] [0-9]+)? DE ([a-z]+)( DE ([0-9]+))?( ás ([0-9:]+))?</span>.*#\
pub_day=\1;\ pub_day=\1;\
pub_month=\3;\ pub_month=\3;\
pub_year=\4;\ pub_year=\5;\
pub_time=\6:00;\ pub_time=\7:00;\
#i') #i')
test ${#pub_day} -lt 2 && pub_day="0$pub_day" test ${#pub_day} -lt 2 && pub_day="0$pub_day"
test $pub_time = ':00' && pub_time=12:00 test $pub_time = ':00' && pub_time=12:00
test -z "$pub_year" && pub_year=1999
m_num=0 m_num=0
for m in jan fev mar abr mai jun jul ago set out nov dez; do for m in jan fev mar abr mai jun jul ago set out nov dez; do
m_num=$(($m_num+1)) m_num=$(($m_num+1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment