File: compare-locales.sh

package info (click to toggle)
https-everywhere 4.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,040 kB
  • ctags: 1,990
  • sloc: xml: 29,807; python: 1,839; sh: 322; makefile: 36
file content (17 lines) | stat: -rwxr-xr-x 536 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash

# Check whether all included rules include every entity defined in the
# English locale DTDs.  (Missing an entity is a fatal error.)

# Requires bash in order to avoid making temporary files.  We could
# change this but we'd probably need to create temporary files.

status=0

pushd src/chrome/locale
for lang in *
do
   comm -2 -3 <(grep '^<!ENTITY' en/* | cut -d' ' -f2 | sort -u) <(grep '^<!ENTITY' $lang/* | cut -d' ' -f2 | sort -u) | grep . && echo "\_ missing for locale" $lang && status=1
done

exit $status