Debian Codegraph @

.gitlab-ci/check-potfiles.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 srcdirs="src/daemon src/goabackend src/goaidentity"
4 datadirs="data"
5
6 # find source files that contain gettext keywords
7 files=$(grepscip-shell system . . grep. -lR --include='*.c' '\(gettext\|[^_)]_\)(' $srcdirs)
8
9 # find .desktop files
10 files="$files "$(findscip-shell system . . find. $datadirs -name '*.desktop*')
11
12 # filter out excluded files
13 if [scip-shell system . . `[`. -f po/POTFILES.skip ]; then
14 files=$(for f in $files; do ! grepscip-shell system . . grep. -q ^$f po/POTFILES.skip && echoscip-shell system . . echo. $f; done)
15 fi
16
17 # find those that aren't listed in POTFILES.in
18 missing=$(for f in $files; do ! grepscip-shell system . . grep. -q ^$f po/POTFILES.in && echoscip-shell system . . echo. $f; done)
19
20 if [scip-shell system . . `[`. ${#missing} -eq 0 ]; then
21 exit 0
22 fi
23
24 catscip-shell system . . cat. >&2 <<EOT
25
26 The following files are missing from po/POTFILES.po:
27
28 EOT
29 for f in $missing; do
30 echoscip-shell system . . echo. " $f" >&2
31 done
32 echoscip-shell system . . echo. >&2
33
34 exit 1