File: test.sh

package info (click to toggle)
changetrack 4.7-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 232 kB
  • ctags: 15
  • sloc: perl: 1,066; sh: 65; makefile: 48
file content (28 lines) | stat: -rwxr-xr-x 551 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
27
28
#!/bin/sh

if [ ! `which perl` ] ; then
    echo "This program requires Perl."
    exit 1
fi

FAILCHANGETRACKTEST=
for I in File::Copy Getopt::Std File::Path FileHandle strict;
  do
  echo "Checking $I..."

	perl -e "use $I;"
  if [ "$?" -ne 0 ] ; then
			echo "Perl library '$I' is not installed.\nYou might find it here: http://search.cpan.org/search?query=$I" 
			FAILCHANGETRACKTEST=-1
	fi
done

rcs -V >/dev/null
if [ "$?" -ne 0 ] ; then
		echo "RCS is not installed."
		FAILCHANGETRACKTEST=-1
fi

if [ $FAILCHANGETRACKTEST ] ; then 
		exit 1
fi