From: Einar Jørgen Haraldseid <einar@haraldseid.net>
Date: Thu, 7 Mar 2013 14:32:49 +0000 (+0100)
Subject: Mottatt patch for å matche mer nøyaktig på temperatur og tidspunkt for siste måling
X-Git-Url: https://git.slaskete.net/yr-temp.sh/commitdiff_plain

Mottatt patch for å matche mer nøyaktig på temperatur og tidspunkt for siste måling
---

diff --git a/yr-temp.sh b/yr-temp.sh
index 07898b5..0f9dd59 100755
--- a/yr-temp.sh
+++ b/yr-temp.sh
@@ -55,9 +55,9 @@ else
 fi
 
 # Hent ut data ved hjelp av XPath
-TEMP=$(cat ${FIL} | xmlstarlet sel -t -v "//weatherstation[1]//@value")
-STASJON=$(cat ${FIL} | xmlstarlet sel -t -v "//weatherstation[1]//@name")
-TIME_ZULU=$(cat ${FIL} | xmlstarlet sel -t -v "//weatherstation[1]//@time" | tr T ' ')
+TEMP=$(cat ${FIL} | xmlstarlet sel -t -v "//weatherstation[1]/temperature/@value")
+STASJON=$(cat ${FIL} | xmlstarlet sel -t -v "//weatherstation[1]/@name")
+TIME_ZULU=$(cat ${FIL} | xmlstarlet sel -t -v "//weatherstation[1]/temperature/@time" | tr T ' ')
 
 # Og litt ekstra datatygging
 TIME=$(date +%H.%M -d "${TIME_ZULU}")