source: tests/scripts/checkscripts.sh @ 2efd544

Last change on this file since 2efd544 was 2efd544, checked in by zzz <zzz@…>, 3 years ago

Tests: Add scala files to UTF-8 tests
Make tests less noisy

  • Property mode set to 100755
File size: 2.1 KB
Line 
1#!/bin/sh
2
3# Check scripts in the I2P source for validity by running with "sh -n
4# $SCRIPTNAME". Optionally checks for bashisms if "checkbashisms" is installed.
5
6# Exits 0 if no errors, non-zero otherwise
7
8
9cd `dirname $0`/../..
10
11# Only Bourne-compatible scripts should be in this list.
12SCRIPTFILES="\
13        ./apps/desktopgui/bundle-messages.sh \
14        ./apps/i2psnark/java/bundle-messages.sh \
15        ./apps/i2psnark/launch-i2psnark \
16        ./apps/i2ptunnel/java/bundle-messages-proxy.sh \
17        ./apps/i2ptunnel/java/bundle-messages.sh \
18        ./apps/routerconsole/java/bundle-messages-news.sh \
19        ./apps/routerconsole/java/bundle-messages.sh \
20        ./apps/sam/c/examples/i2p-ping/pinger.sh \
21        ./apps/susidns/src/bundle-messages.sh \
22        ./apps/susimail/bundle-messages.sh \
23        ./core/c/build.sh \
24        ./core/c/jbigi/build-all.sh \
25        ./core/c/jbigi/build_jbigi.sh \
26        ./core/c/jbigi/build.sh \
27        ./core/c/jbigi/mbuild-all.sh \
28        ./core/c/jcpuid/build.sh \
29        ./core/c/mbuild.sh \
30        ./debian/i2p.config \
31        ./debian/i2p-doc.preinst \
32        ./debian/i2p.init \
33        ./debian/i2p.postinst \
34        ./debian/i2p.postrm \
35        ./debian/i2p.preinst \
36        ./debian/libjbigi-jni.preinst \
37        ./debian/repack.sh \
38        ./installer/resources/install_i2p_service_osx.command \
39        ./installer/resources/install_i2p_service_unix \
40        ./installer/resources/locale/bundle-messages.sh \
41        ./installer/resources/makegeoipv6.sh \
42        ./installer/resources/postinstall.sh \
43        ./installer/resources/runplain.sh \
44        ./installer/resources/uninstall_i2p_service_osx.command
45        ./installer/resources/uninstall_i2p_service_unix \
46        ./Slackware/i2p/i2p.SlackBuild \
47        ./Slackware/i2p/doinst.sh \
48        ./Slackware/i2p/rc.i2p \
49        ./tests/scripts/checkcerts.sh \
50        ./tests/scripts/checkpo.sh \
51        ./tests/scripts/checkutf8.sh \
52        ./tests/scripts/checkxml.sh \
53        ./tests/scripts/testjbigi.sh \
54"
55
56for script in $SCRIPTFILES; do
57    #echo "Checking $script ..."
58    if sh -n "$script" ; then : ; else
59        echo "********* FAILED CHECK FOR $script *************"
60        FAIL=1
61    fi
62    if $(which checkbashisms > /dev/null 2>&1) ; then
63        checkbashisms $script
64    fi
65done
66
67if [ "$FAIL" != "" ]
68then
69    echo "******** At least one file failed check *********"
70else
71    echo "All files passed"
72fi
73exit $FAIL
Note: See TracBrowser for help on using the repository browser.