File: check-language.sh

package info (click to toggle)
gtksourceview4 4.8.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,376 kB
  • sloc: ansic: 50,318; xml: 1,432; javascript: 856; perl: 212; sh: 150; php: 48; yacc: 45; ruby: 38; sql: 30; cobol: 20; objc: 19; lisp: 19; fortran: 14; python: 13; makefile: 13; cpp: 8; ml: 3
file content (32 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (12)
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