1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-08 13:44:32 +02:00

Gen rangedate param only for show, validate and delete command.

This commit is contained in:
stalkerg 2016-10-13 16:20:53 +03:00
parent c67832583e
commit b6ceb7ff2e
2 changed files with 14 additions and 9 deletions

View File

@ -7,8 +7,8 @@ Usage:
pg_arman OPTION init
pg_arman OPTION backup
pg_arman OPTION restore
pg_arman OPTION show [DATE]
pg_arman OPTION validate [DATE]
pg_arman OPTION show [DATE] [DATE]
pg_arman OPTION validate [DATE] [DATE]
pg_arman OPTION delete DATE
Common Options:
@ -53,8 +53,8 @@ Generic options:
--help show this help, then exit
--version output version information, then exit
Read the website for details. <https://github.com/michaelpq/pg_arman>
Report bugs to <https://github.com/michaelpq/pg_arman/issues>.
Read the website for details. <https://github.com/stalkerg/pg_arman>
Report bugs to <https://github.com/stalkerg/pg_arman/issues>.
1
###### COMMAND OPTION TEST-0002 ######

View File

@ -16,8 +16,8 @@
#include <sys/stat.h>
const char *PROGRAM_VERSION = "0.1";
const char *PROGRAM_URL = "https://github.com/michaelpq/pg_arman";
const char *PROGRAM_EMAIL = "https://github.com/michaelpq/pg_arman/issues";
const char *PROGRAM_URL = "https://github.com/stalkerg/pg_arman";
const char *PROGRAM_EMAIL = "https://github.com/stalkerg/pg_arman/issues";
/* path configuration */
char *backup_path;
@ -109,8 +109,13 @@ main(int argc, char *argv[])
for (; i < argc; i++)
{
if (cmd == NULL)
{
cmd = argv[i];
else if (range1 == NULL)
if(strcmp(cmd, "show") != 0 &&
strcmp(cmd, "validate") != 0 &&
strcmp(cmd, "delete") != 0)
break;
} else if (range1 == NULL)
range1 = argv[i];
else if (range2 == NULL)
range2 = argv[i];
@ -229,8 +234,8 @@ pgut_help(bool details)
printf(_(" %s OPTION init\n"), PROGRAM_NAME);
printf(_(" %s OPTION backup\n"), PROGRAM_NAME);
printf(_(" %s OPTION restore\n"), PROGRAM_NAME);
printf(_(" %s OPTION show [DATE]\n"), PROGRAM_NAME);
printf(_(" %s OPTION validate [DATE]\n"), PROGRAM_NAME);
printf(_(" %s OPTION show [DATE] [DATE]\n"), PROGRAM_NAME);
printf(_(" %s OPTION validate [DATE] [DATE]\n"), PROGRAM_NAME);
printf(_(" %s OPTION delete DATE\n"), PROGRAM_NAME);
if (!details)