package cdb; # Configuration database use strict; sub check (); # List of files and directories which should copied via sync. my @cdb_rsync_sources = ( # Official Cactus entries 'CONTRIBUTORS', 'COPYRIGHT', 'Makefile', 'arrangements', 'src', 'lib', ); # List of files and directories containing parameter files which # should copied via sync. my @cdb_rsync_parfiles = ( # Official Cactus entries 'examples', 'par', # Would be nice, but patterns and subdirectories are not supported #'arrangements/*/par', #'arrangements/*/*/par', ); # File name patterns that are excuded from synchronising with rsync's # --exclude option. These patterns will be protected from the shell # by quoting. my @cdb_rsync_excludes = ( '_darcs', 'CVS', 'doxygen', '.#*', '.DS_Store', '.git', '.hg', '.svn', '*~', ); # List of defines my %cdb_defines = ( ); # List of substitutions my %cdb_substitutions = ( ); # List of replacements my %cdb_replacements = ( ); # List of attachments my %cdb_attachments = ( ); # The database our %configuration_database = ( 'default-configuration-name' => 'sim', 'rsync-sources' => \@cdb_rsync_sources, 'rsync-parfiles' => \@cdb_rsync_parfiles, 'rsync-excludes' => \@cdb_rsync_excludes, 'defines' => \%cdb_defines, 'replacements' => \%cdb_replacements, 'thornlist' => undef, ); # Check that the configuration database is consistent and complete sub check () { # Check all mdb entries my $error = 0; { my $sim = $configuration_database{'default-configuration-name'}; if ($sim !~ m|^[-[:alnum:]._]+$|) { $error = 1; } } die if $error; } # Check database check; 1;