File: checkspaces

package info (click to toggle)
pari 2.17.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 24,508 kB
  • sloc: ansic: 281,184; sh: 861; perl: 420; yacc: 214; makefile: 162; f90: 88
file content (26 lines) | stat: -rwxr-xr-x 726 bytes parent folder | download | duplicates (6)
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
unset LANG LC_ALL LC_COLLATE LC_CTYPE
srcbase="`echo src/*/*.[chy] | sed -e 's,src/language/parse\.[ch],,g'`"
CFILES="$srcbase src/*/*/*.[ch] examples/*.c examples/*.gp"
docbase="`echo doc/*.tex doc/*.1 | sed -e 's,doc/usersch3.tex,,'`"
OFILES="$docbase AUTHORS COMPAT NEW TODO CHANGES src/test/in/* src/functions/*/*"
SCRIPTS="config/* src/test/dotest"
ALLFILES="$CFILES $OFILES $SCRIPTS"
err=0;
if grep -P '[\x80-\xff]' $ALLFILES; then
  echo "BUG: high bit found."
  err=1;
fi
if grep ' $' $ALLFILES; then
  echo "BUG: trailing spaces found."
  err=1;
fi
if grep '	' $CFILES $OFILES; then
  echo "BUG: TAB found."
  err=1;
fi
if grep '	$' $SCRIPTS; then
  echo "BUG: TAB found in scripts."
  err=1;
fi
exit $err