summaryrefslogtreecommitdiff
path: root/libre/icecat-l10n
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2017-11-29 07:16:15 +0100
committerAndreas Grapentin <andreas@grapentin.org>2017-11-29 07:16:49 +0100
commitfc306fcb03eb7314f35506cc5f1020d4243736f5 (patch)
treeb728860fd6e327234634a64dd37b139feb238e85 /libre/icecat-l10n
parent396e12602cffb6e51188db908a9671e3a0312649 (diff)
consolidated langpack list checkers for ice* packages
Diffstat (limited to 'libre/icecat-l10n')
-rw-r--r--libre/icecat-l10n/check.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/libre/icecat-l10n/check.sh b/libre/icecat-l10n/check.sh
new file mode 100644
index 000000000..99f792c3d
--- /dev/null
+++ b/libre/icecat-l10n/check.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# helper script to check the local language list against upstream
+
+# extract pkgbase from pkgbuild
+pkgbase="$(bash -c "source PKGBUILD && echo \"\$pkgbase\"")"
+
+# extract language list from pkgbuild
+bash -c "source PKGBUILD && printf '%s\n' \"\${_languages[@]}\" | cut -d ' ' -f1 | sort" \
+ > $pkgbase-l10n.local
+
+# load language list from upstream
+url="$(bash -c "source PKGBUILD && echo \"\$_url\"")/"
+curl -sL $url | \
+ grep '\.xpi"' | cut -d'"' -f8 | rev | cut -d'/' -f1 | cut -d'.' -f3 | rev | sort \
+ > $pkgbase-l10n.remote
+
+diff -rupN $pkgbase-l10n.local $pkgbase-l10n.remote
+rm -f $pkgbase-l10n.{local,remote}