File: torture_test

package info (click to toggle)
gpsbabel 1.10.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,680 kB
  • sloc: cpp: 104,866; xml: 9,686; sh: 1,792; ansic: 1,086; perl: 520; tcl: 74; makefile: 18
file content (28 lines) | stat: -rwxr-xr-x 668 bytes parent folder | download | duplicates (7)
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
#!/bin/sh

PNAME=${PNAME:-./gpsbabel}
DIFF=${DIFF:-diff}

TMPDIR=${GBTEMP:-/tmp}/gpsbabel.$$
mkdir -p $TMPDIR
trap "rm -fr $TMPDIR" 0 1 2 3 15

#
# This is  nasty.   If we have a dictionary handy, treat it as a list of
# waypoints and reduce all the names to eight characters.   Fewer chars
# results in lost waypoints currently and that's a defect.
#
DICT=/usr/share/dict/words
if [ -f $DICT ];
then
        WORDS=`cat $DICT | wc -l`
        SWORDS=`${PNAME} -i gpsdrive -f $DICT -o gpsdrive,snlen=8 -F /dev/fd/1 |
 wc -l`
        if [ $WORDS -ne $SWORDS ];
        then
                echo "Shortname reduction failed."
                exit 1
        fi
fi

exit 0