[libgweather] data/check-timezones.sh: Add a check for obsolete tzdata identifiers used in Locations.xml.in.
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgweather] data/check-timezones.sh: Add a check for obsolete tzdata identifiers used in Locations.xml.in.
- Date: Mon, 2 Nov 2009 17:28:16 +0000 (UTC)
commit ab44c75dc97ce597cb7703f7bb85b62fce65d4a2
Author: Philippe Gauthier <philippe gauthier deuxpi ca>
Date: Thu Oct 29 19:22:20 2009 -0400
data/check-timezones.sh: Add a check for obsolete tzdata identifiers used in Locations.xml.in.
https://bugzilla.gnome.org/show_bug.cgi?id=559031
data/check-timezones.sh | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/data/check-timezones.sh b/data/check-timezones.sh
index 79c8ba4..ab3bf08 100755
--- a/data/check-timezones.sh
+++ b/data/check-timezones.sh
@@ -24,4 +24,17 @@ if [ -n "$bad" ]; then
echo "Invalid timezones in ${locations}: $bad" 1>&2
exit 1
fi
+
+used=`mktemp`
+obsolete=`mktemp`
+
+sed -ne 's/.*<tz-hint>\(.*\)<.*/\1/p' $locations | sort -u > $used
+sed -ne 's/.*<obsoletes>\(.*\)<.*/\1/p' $locations | sort -u > $obsolete
+bad=`comm -12 $used $obsolete`
+rm $used $obsolete
+
+if [ -n "$bad" ]; then
+ echo "Obsolete <tz-hint> timezones in ${locations}: $bad" 1>&2
+ exit 1
+fi
exit 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]