#!/usr/bin/perl -w use strict; #use File::Tree; use File::Copy; use lib 't'; use BSE::Test (); require ExtUtils::Manifest; my $dist = shift or die "Usage: $0 distdir [leavedb]"; my $leavedb = shift or 0; my $instbase = shift || BSE::Test::base_dir() || die "No base_dir"; my $mysql = BSE::Test::mysql_name; # if (-e "$instbase/cgi-bin/modules/Constants.pm" # && !-e "$instbase/Constants.pm") { # system "cp $instbase/cgi-bin/modules/Constants.pm $instbase/Constants.pm" # } system("rm -rf $instbase/cgi-bin") and die "Cannot remove cgi-bin"; system "rm -rf $instbase/data" and die "Cannot remove data"; #system "rm -f $instbase/htdocs/{*.html,a/*.html,shop/*.html,images/*.jpg}" # and die "Cannot remove htdocs"; system "cp -rf $dist/site/cgi-bin $instbase" and die "Cannot copy cgi-bin"; my $perl = BSE::Test::test_perl(); if ($perl ne '/usr/bin/perl') { my $manifest = ExtUtils::Manifest::maniread(); for my $file (grep /\.pl$/, keys %$manifest) { (my $work = $file) =~ s!^site!!; next unless $work =~ /cgi-bin/; my $full = $instbase . $work; open SCRIPT, "< $full" or die "Cannot open $full: $!"; binmode SCRIPT; my @all =