From 04a76e9910a1383bd5362ebf9695cdde30c4b7bb Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 29 Aug 2005 05:28:50 +0000 Subject: [PATCH] add code to delete duplicate documentation --- docs/upgrades/upgrade_6.7.2-6.7.3.pl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/upgrades/upgrade_6.7.2-6.7.3.pl b/docs/upgrades/upgrade_6.7.2-6.7.3.pl index b9ecdaf8c..a20f86849 100644 --- a/docs/upgrades/upgrade_6.7.2-6.7.3.pl +++ b/docs/upgrades/upgrade_6.7.2-6.7.3.pl @@ -9,13 +9,28 @@ my $configFile; my $quiet; start(); - +deleteOldHelpFiles(); finish(); #------------------------------------------------- #sub fixSomething { # print "\tFixing ....\n" unless ($quiet); +sub deleteOldHelpFiles { + my @dupes = qw/Article Collaboration DataForm EventsCalendar File Folder Survey HttpProxy + IndexedSearch Image Layout MessageBoard Navigation Poll Post Product + Redirect Shortcut Snippet SQLReport SyndicatedContent Template Thread/; + my $path = "../../lib/WebGUI/"; + print "\tDeleting old documentation\n" unless ($quiet); + foreach my $dupe (@dupes) { + print "\tDeleting old documentation for $dupe\n" unless ($quiet); + foreach my $dir ("Help/", "i18n/English/") { + my $file = join '', $path, $dir, $dupe, '.pm'; + my $files_deleted = unlink($file); + print("\t\tUnable to delete $file: $!\n") unless $quiet or $files_deleted; + } + } +} #-------------------------------------------------