Parcourir la source

improve documentation

El RIDO il y a 3 ans
Parent
commit
5de779a989
2 fichiers modifiés avec 9 ajouts et 6 suppressions
  1. 2 1
      bin/administration
  2. 7 5
      bin/migrate

+ 2 - 1
bin/administration

@@ -125,13 +125,14 @@ class Administration
     {
         echo <<<'EOT'
 Usage:
-  administration [--delete <paste id> | --empty-dirs | --help | --statistics]
+  administration [--delete <paste id> | --empty-dirs | --help | --purge | --statistics]
 
 Options:
   -d, --delete      deletes the requested paste ID
   -e, --empty-dirs  removes empty directories (only if Filesystem storage is
                     configured)
   -h, --help        displays this help message
+  -p, --purge       purge all expired pastes
   -s, --statistics  reads all stored pastes and comments and reports statistics
 EOT, PHP_EOL;
         exit($code);

+ 7 - 5
bin/migrate

@@ -17,13 +17,14 @@ if (version_compare(PHP_VERSION, '7.1.0') < 0) {
 
 $longopts = array(
     "delete-after",
-    "delete-during"
+    "delete-during",
+    "help"
 );
 $opts_arr = getopt("fhnv", $longopts, $rest);
 if ($opts_arr === false) {
-    dieerr("Erroneous command line options. Please use -h");
+    dieerr("Erroneous command line options. Please use --help");
 }
-if (array_key_exists("h", $opts_arr)) {
+if (array_key_exists("h", $opts_arr) || array_key_exists("help", $opts_arr)) {
     helpexit();
 }
 
@@ -173,12 +174,12 @@ function debug ($text) {
 
 function helpexit ()
 {
-    print("migrate.php - Copy data between PrivateBin backends
+    print("migrate - Copy data between PrivateBin backends
 
 Usage:
   migrate [--delete-after] [--delete-during] [-f] [-n] [-v] srcconfdir
           [<dstconfdir>]
-  migrate [-h]
+  migrate [-h|--help]
 
 Options:
   --delete-after   delete data from source after all pastes and comments have
@@ -187,6 +188,7 @@ Options:
                    comments have successfully been copied to the destination
   -f               forcefully overwrite data which already exists at the
                    destination
+  -h, --help       displays this help message
   -n               dry run, do not copy data
   -v               be verbose
   <srcconfdir>     use storage backend configration from conf.php found in