Browse Source

Add two new command line options in conf.pl: --update-plugins or -u updates plugin_hooks.php only and exits. --help or -h displays some command line usage.

Alexandros Vellis 19 years ago
parent
commit
878a19bf37
1 changed files with 14 additions and 0 deletions
  1. 14 0
      config/conf.pl

+ 14 - 0
config/conf.pl

@@ -485,6 +485,20 @@ if ( $ARGV[0] eq '--install-plugin' ) {
     @plugins = @newplugins;
     @plugins = @newplugins;
     save_data();
     save_data();
     exit(0);
     exit(0);
+} elsif ( $ARGV[0] eq '--update-plugins' or $ARGV[0] eq '-u') {
+    build_plugin_hook_array();
+    exit(0);
+} elsif ( $ARGV[0] eq '--help' or $ARGV[0] eq '-h') {
+    print "SquirrelMail Configuration Script\n";
+    print "Usage:\n";
+    print " * No arguments: initiates the configuration dialog\n";
+    print " * --install-plugin <plugin> : activates the specified plugin\n";
+    print " * --remove-plugin <plugin>  : deactivates the specified plugin\n";
+    print " * --update-plugins , -u     : rebuilds plugin_hooks.php according\n";
+    print "                               to plugins activated in config.php\n";
+    print " * --help , -h               : Displays this help\n";
+    print "\n";
+    exit(0);
 }
 }
 
 
 #####################################################################################
 #####################################################################################