diff options
| author | Victor Kareh <[email protected]> | 2026-03-12 15:16:30 -0400 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2026-03-12 15:29:36 -0400 |
| commit | 086f1835af0d06234ed5ac295a960e5ea8aa24ea (patch) | |
| tree | 6d92ec6030f2ad43c5ccebd947e287d7058a1139 | |
| parent | b907883510300f22f703a6d1a70b2fc8b6b56d85 (diff) | |
| download | libmateweather-086f1835af0d06234ed5ac295a960e5ea8aa24ea.tar.bz2 libmateweather-086f1835af0d06234ed5ac295a960e5ea8aa24ea.tar.xz | |
data: Remove check-timezones.sh
The code is quite clunky and a similar test already exists in
test_libmateweather.
Backported from libgweather: https://gitlab.gnome.org/GNOME/libgweather/-/commit/b5fcc840
| -rw-r--r-- | data/Makefile.am | 2 | ||||
| -rwxr-xr-x | data/check-timezones.sh | 40 |
2 files changed, 0 insertions, 42 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index 8676fb1..3ed47dd 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -50,12 +50,10 @@ locationdb.sqlite: build-locationdb.pl major-cities.txt sources/nsd_cccc.txt sou check: xmllint --valid --noout $(top_srcdir)/data/Locations.xml.in - $(srcdir)/check-timezones.sh $(srcdir)/Locations.xml.in EXTRA_DIST = \ $(libmateweatherlocations_in_files) \ $(libmateweatherdtd_DATA) \ - check-timezones.sh \ README \ README.timezones diff --git a/data/check-timezones.sh b/data/check-timezones.sh deleted file mode 100755 index ab3bf08..0000000 --- a/data/check-timezones.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -if test -f /usr/share/zoneinfo/zone.tab; then - tzdb=/usr/share/zoneinfo/zone.tab -else - if test -f /usr/share/lib/zoneinfo/tab/zone_sun.tab; then - tzdb=/usr/share/lib/zoneinfo/tab/zone_sun.tab - else - echo "No timezone database found" - exit 1 - fi -fi - -locations=${1:-Locations.xml.in} -used=`mktemp` -correct=`mktemp` - -sed -ne 's/.*<tz-hint>\(.*\)<.*/\1/p' $locations | sort -u > $used -awk '{print $3;}' $tzdb | sort -u > $correct -bad=`comm -13 $correct $used` -rm $correct $used - -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 |
