xml to xmlstarlet

This commit is contained in:
Maciej Krok 2016-12-26 20:53:52 +01:00
parent 2c6ffbee87
commit 3e60231636

View File

@ -10,11 +10,11 @@ TIMECASH=$(( 60 * 60 * 5 )) # 5 minut
NOW=$(date -u +%s) NOW=$(date -u +%s)
LASTTIME=$(xml sel -t -v "/xml/entries/entry/time" $WXFILE ) LASTTIME=$(xmlstarlet sel -t -v "/xml/entries/entry/time" $WXFILE )
if (( $NOW - $TIMECASH > $LASTTIME +1 )) if (( $NOW - $TIMECASH > $LASTTIME +1 ))
then then
wget $WXAPRS -O $WXFILE wget $WXAPRS -O $WXFILE
fi fi
xml sel -t -v "/xml/entries/entry/$NAMETAG" $WXFILE xmlstarlet sel -t -v "/xml/entries/entry/$NAMETAG" $WXFILE