diff options
author | Kim Alvefur <zash@zash.se> | 2022-01-09 15:57:59 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-01-09 15:57:59 +0100 |
commit | bf60d226b875f77381a56b1385541f4866555370 (patch) | |
tree | c9cdbd6753e5a215fc51d7f4904149c996b62a41 | |
parent | 6852806c10e766fc982789c8badfef967dac466d (diff) | |
download | prosody-bf60d226b875f77381a56b1385541f4866555370.tar.gz prosody-bf60d226b875f77381a56b1385541f4866555370.zip |
migrator: Reuse earlier usage text
-rw-r--r-- | tools/migration/prosody-migrator.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/migration/prosody-migrator.lua b/tools/migration/prosody-migrator.lua index fe2adb3a..f5631bdf 100644 --- a/tools/migration/prosody-migrator.lua +++ b/tools/migration/prosody-migrator.lua @@ -34,6 +34,11 @@ end local default_config = (CFG_CONFIGDIR or ".").."/migrator.cfg.lua"; +local function usage() + print("Usage: " .. arg[0] .. " FROM_STORE TO_STORE"); + print("If no stores are specified, 'input' and 'output' are used."); +end + local startup = require "util.startup"; do startup.parse_args({ @@ -43,7 +48,7 @@ do startup.init_global_state(); prosody.process_type = "migrator"; if prosody.opts.help then - print("prosody-migrator [input] [output]") + usage(); os.exit(0); end startup.force_console_logging(); @@ -112,8 +117,7 @@ end if have_err then print(""); - print("Usage: "..arg[0].." FROM_STORE TO_STORE"); - print("If no stores are specified, 'input' and 'output' are used."); + usage(); print(""); print("The available stores in your migrator config are:"); print(""); |