File: configtest

package info (click to toggle)
swirc 3.5.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,988 kB
  • sloc: ansic: 18,321; cpp: 17,795; sh: 968; python: 254; makefile: 104; javascript: 20
file content (34 lines) | stat: -rwxr-xr-x 565 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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

DIR=configfiles/
FILENAMES="
shouldFail1.conf
shouldFail2.conf
shouldFail3.conf
shouldFail4.conf
shouldFail5.conf
shouldFail6.conf
"

if test ! -f "../swirc"; then
	echo "error: no swirc executable"
	exit 1
fi

for file in $FILENAMES; do
	printf "%b----------%b"\
	    "\033[1;30m"\
	    "\033[0m"
	printf " %b${DIR}${file}%b " "\033[1;32m" "\033[0m"
	printf "%b----------%b"\
	    "\033[1;30m"\
	    "\033[0m"
	echo ""

	if test -f "${DIR}${file}"; then
		head -1 "${DIR}${file}"
		../swirc -x "${DIR}${file}"
	else
		echo "error: nonexistent"
	fi
done