summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'libre/icedove-l10n/check.sh')
-rw-r--r--libre/icedove-l10n/check.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/libre/icedove-l10n/check.sh b/libre/icedove-l10n/check.sh
index 4c92ca12e..ea37f4c4f 100644
--- a/libre/icedove-l10n/check.sh
+++ b/libre/icedove-l10n/check.sh
@@ -1,15 +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" \
- > icedove-l10n.local
+ > $pkgbase-l10n.local
# load language list from upstream
-url="$(bash -c "source PKGBUILD && echo \"\$_pkgurl\"")/"
+url="$(bash -c "source PKGBUILD && echo \"\$_url\"")/"
curl -sL $url | \
- grep '\.xpi' | cut -d'"' -f2 | rev | cut -d'/' -f1 | rev | cut -d'.' -f1 | sort\
- > icedove-l10n.remote
+ grep '\.xpi' | cut -d'"' -f2 | rev | cut -d'/' -f1 | cut -d'.' -f2 | rev | sort\
+ > $pkgbase-l10n.remote
-diff -rupN icedove-l10n.local icedove-l10n.remote
-rm -f icedove-l10n.{local,remote}
+diff -rupN $pkgbase-l10n.local $pkgbase-l10n.remote
+rm -f $pkgbase-l10n.{local,remote}