|
|
@@ -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
|