fetch: allow enabling --simulate

cute-signatures
Timo Teräs 2016-02-16 15:59:55 +02:00
parent 445ea07220
commit a2a5cd9c69
2 changed files with 6 additions and 2 deletions

View File

@ -106,6 +106,9 @@ static int option_parse_global(void *ctx, struct apk_db_options *dbopts, int opt
case 0x101: case 0x101:
apk_flags |= APK_PROGRESS; apk_flags |= APK_PROGRESS;
break; break;
case 0x104:
apk_flags |= APK_SIMULATE;
break;
case 0x110: case 0x110:
apk_flags &= ~APK_PROGRESS; apk_flags &= ~APK_PROGRESS;
break; break;

View File

@ -93,8 +93,9 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
static const struct apk_option options_applet[] = { static const struct apk_option options_applet[] = {
{ 'L', "link", "Create hard links if possible" }, { 'L', "link", "Create hard links if possible" },
{ 'R', "recursive", "Fetch the PACKAGE and all its dependencies" }, { 'R', "recursive", "Fetch the PACKAGE and all its dependencies" },
{ 's', "stdout", { 0x104, "simulate", "Show what would be done without actually doing it" },
"Dump the .apk to stdout (incompatible with -o, -R, --progress)" }, { 's', "stdout", "Dump the .apk to stdout (incompatible "
"with -o, -R, --progress)" },
{ 'o', "output", "Directory to place the PACKAGEs to", { 'o', "output", "Directory to place the PACKAGEs to",
required_argument, "DIR" }, required_argument, "DIR" },
}; };