From 367b81fc2b7d3c3293652968b1bc8b16cce0d887 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Sat, 10 Feb 2001 17:54:50 +0000 Subject: [PATCH] added plugins to their own module git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1121 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/README.plugins | 27 -------- plugins/index.php | 14 ---- plugins/make_archive.pl | 144 ---------------------------------------- 3 files changed, 185 deletions(-) delete mode 100644 plugins/README.plugins delete mode 100644 plugins/index.php delete mode 100755 plugins/make_archive.pl diff --git a/plugins/README.plugins b/plugins/README.plugins deleted file mode 100644 index ea62502e..00000000 --- a/plugins/README.plugins +++ /dev/null @@ -1,27 +0,0 @@ -Plugins -======= - -To understand more about plugins, read doc/plugin.txt - -For the impatient, here is an extremely brief overview of how to -install plugins. - - 1. Change to the plugins directory. - - $ cd plugins/ - - 2. Unarchive the plugin. - - $ tar -zxvf /home/me/myplugin.tar.gz - - 3. Note the directory that the plugin was created into. For this - example, we will assume it was put in the directory: myplugin/. - - 4. Go to the config directory and run conf.pl - - $ cd ../../config/ - $ ./conf.pl - - 5. Choose option 8 and proceed to add the new plugin following - the instructions there. Save and exit, and your plugin should - be in place. diff --git a/plugins/index.php b/plugins/index.php deleted file mode 100644 index 9d9ed2ca..00000000 --- a/plugins/index.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/plugins/make_archive.pl b/plugins/make_archive.pl deleted file mode 100755 index 3a3bf173..00000000 --- a/plugins/make_archive.pl +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/perl -# -# This all could (maybe) be done in a shell script, but I suck at those. - -$i = 0; -$Verbose = 0; -$Plugin = ""; -$Version = ""; - -foreach $arg (@ARGV) -{ - if ($arg eq "-v") - { - $Verbose = 1; - } - elsif ($Plugin eq "") - { - $Plugin = $arg; - } - elsif ($Version eq "") - { - $Version = $arg; - } - else - { - print "Unrecognized argument: $arg\n"; - exit(0); - } -} - -if ($Version eq "") -{ - print "Syntax: make_archive.pl [-v] plugin_name version.number\n"; - print "-v = be verbose\n"; - exit(0); -} - - -print "Reformatting plugin name and version number.\n" if ($Verbose); -$Plugin =~ s/\///g; -$Version =~ s/\./_/g; - -VerifyInfo($Plugin, $Version); - -print "Getting file list.\n" if ($Verbose); -@Files = RecurseDir($Plugin); - -$QuietString = " > /dev/null 2> /dev/null" if (! $Verbose); - -print "\n\n" if ($Verbose); -print "Creating $Plugin-$Version.tar.gz\n"; -system("tar cvfz $Plugin-$Version.tar.gz $Plugin" . FindTarExcludes(@Files) - . $QuietString); - -print "\n\n" if ($Verbose); -print "Creating $Plugin-$Version.zip\n"; -system("zip -r $Plugin-$Version.zip $Plugin/" . FindZipExcludes(@Files) - . $QuietString); - - - -sub VerifyInfo -{ - local ($Plugin, $Version) = @_; - - if (! -e $Plugin && ! -d $Plugin) - { - print "The $Plugin directory doesn't exist, " . - "or else it is not a directory.\n"; - exit(0); - } -} - - -sub FindTarExcludes -{ - local (@Files) = @_; - - $ExcludeStr = ""; - - foreach $File (@Files) - { - if ($File =~ /^(.*\/CVS)\/$/) - { - $ExcludeStr .= " $1"; - } - } - - if ($ExcludeStr ne "") - { - $ExcludeStr = " --exclude" . $ExcludeStr; - } - - return $ExcludeStr; -} - -sub FindZipExcludes -{ - local (@Files) = @_; - - $ExcludeStr = ""; - - foreach $File (@Files) - { - if ($File =~ /^(.*\/CVS)\/$/) - { - $ExcludeStr .= " $1/ $1/*"; - } - } - - if ($ExcludeStr ne "") - { - $ExcludeStr = " -x" . $ExcludeStr; - } - - return $ExcludeStr; -} - -sub RecurseDir -{ - local ($Dir) = @_; - local (@Files, @Results); - - opendir(DIR, $Dir); - @Files = readdir(DIR); - closedir(DIR); - - @Results = ("$Dir/"); - - foreach $file (@Files) - { - next if ($file =~ /^[\.]+/); - if (-d "$Dir/$file") - { - push (@Results, RecurseDir("$Dir/$file")); - } - else - { - push (@Results, "$Dir/$file"); - } - } - - return @Results; -} -- 2.25.1