File: utf-8-strings.sh

package info (click to toggle)
hfst 3.16.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,532 kB
  • sloc: cpp: 101,875; sh: 6,717; python: 5,225; yacc: 4,985; lex: 2,900; makefile: 2,017; xml: 6
file content (26 lines) | stat: -rwxr-xr-x 475 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
TOOLDIR=../../tools/src
TOOL1=
TOOL2=

if [ "$1" = '--python' ]; then
    TOOL1="python3 ./hfst-strings2fst.py"
    TOOL2="python3 ./hfst-fst2strings.py"
else
    TOOL1=$TOOLDIR/hfst-strings2fst
    TOOL2=$TOOLDIR/hfst-fst2strings
    if ! test -x $TOOL1; then
	exit 0;
    fi
    if ! test -x $TOOL2; then
	exit 0;
    fi
fi

if ! $TOOL1 $srcdir/utf-8.strings > test ; then
    exit 1
fi
if ! $TOOL2 < test > test.strings ; then
    exit 1
fi
rm test test.strings