File: check-language.sh

package info (click to toggle)
gtksourceview3 3.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,184 kB
  • ctags: 5,650
  • sloc: ansic: 42,764; sh: 11,441; xml: 2,198; makefile: 742; python: 557; perl: 52; yacc: 45; cobol: 20; objc: 19; fortran: 14; cpp: 8
file content (32 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# "./check-language.sh files..." will validate files given on command line.
# "./check-language.sh" without arguments will validate all language files
# in the source directory

files=""

if [ $1 ]; then
  files=$@
else
  if [ "$srcdir" ]; then
    cd $srcdir
  fi

  for lang in *.lang; do
    case $lang in
      msil.lang) ;;
      *)
        files="$files $lang"
        ;;
    esac
  done
fi

for file in $files; do
  case $file in
  testv1.lang) ;; # skip test file for old format
  *)
    xmllint --relaxng language2.rng --noout $file || exit 1
    ;;
  esac
done