File: testThemeCompleteness

package info (click to toggle)
gnump3d 2.9.3-1sarge3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,420 kB
  • ctags: 366
  • sloc: perl: 10,649; sh: 188; makefile: 147
file content (36 lines) | stat: -rwxr-xr-x 728 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
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/perl
# Test that each installable theme has the necessery files within it.

foreach my $dir ( sort( glob( "../templates/*/" ) ) )
{
    next if ( $dir =~ /CVS/ );

    if ( ! &isThemeDirComplete( $dir ) )
    {
	print "\nTheme $dir is missing at least one file.\n";
	exit 1;

    }
}

exit 0;


sub isThemeDirComplete( $ )
{
    my ( $dir ) = ( @_ );

    if ( ( ! -e $dir . "/error.html" ) ||
	 ( ! -e $dir . "/COPYING.html" ) ||
	 ( ! -e $dir . "/bug.html" ) ||
	 ( ! -e $dir . "/index.html" ) ||
	 ( ! -e $dir . "/results.html" ) ||
	 ( ! -e $dir . "/recent.html" ) ||
	 ( ! -e $dir . "/random.html" ) ||
	 ( ! -e $dir . "/search.html" ) ||
	 ( ! -e $dir . "/stats.html" ) )
    {
	return 0;
    }
    return 1;
}