File: syntax

package info (click to toggle)
davical 1.1.12-2.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,020 kB
  • sloc: php: 19,361; sql: 4,514; perl: 3,524; sh: 554; javascript: 162; makefile: 85
file content (19 lines) | stat: -rwxr-xr-x 425 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# run our test suite, but on the installed package

set -e

# 1) simple php syntax check
for PHP in /usr/share/davical/htdocs/*.php /usr/share/davical/inc/*.php
do
    php -l ${PHP} >> $AUTOPKGTEST_TMP/test-syntax
done

if grep -v 'No syntax errors detected' $AUTOPKGTEST_TMP/test-syntax
then
    cat $AUTOPKGTEST_TMP/test-syntax
    exit 1
else
    echo "OK (Syntax checked)";
fi
rm $AUTOPKGTEST_TMP/test-syntax