File: test-wrapper.sh

package info (click to toggle)
xnee 3.06-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 6,324 kB
  • ctags: 2,429
  • sloc: ansic: 21,992; sh: 12,427; makefile: 563
file content (23 lines) | stat: -rwxr-xr-x 377 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

test_program()
{
    if [ ! -x $1 ]
    then
	echo "Program $1 does not exists, or is not executable"
	return 1
    fi

    xdpyinfo >/dev/null 2>&1 
    if [ "$?" != "0" ]
    then
	echo "Problem with X server (prob authorisation, or no X up and running)"
	echo "   when executing program $1"
	echo "   .... bailing out"
	return 1
    fi
}

test_program $1
exit 0