summaryrefslogtreecommitdiff
path: root/libre/icedove-l10n/check.sh
blob: ea37f4c4ff8c20877fb3be1fef5a78dfdcfdbff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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'"' -f2 | rev | cut -d'/' -f1 | cut -d'.' -f2 | rev | sort\
  > $pkgbase-l10n.remote

diff -rupN $pkgbase-l10n.local $pkgbase-l10n.remote
rm -f $pkgbase-l10n.{local,remote}