Mail archive
alpine-devel

[alpine-devel] [PATCH] apk-tools: Add "-S" short option for "--simulate"

From: Isaac Dunham <ibid.ag_at_gmail.com>
Date: Fri, 4 Jul 2014 20:16:02 -0700

Typing the long option gets old.
---
 src/apk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/apk.c b/src/apk.c
index 970bbb1..fd752dd 100644
--- a/src/apk.c
+++ b/src/apk.c
_at_@ -50,6 +50,8 @@ static struct apk_option generic_options[] = {
 	{ 'V', "version",	"Print program version and exit" },
 	{ 'f', "force",		"Do what was asked even if it looks dangerous" },
 	{ 'U', "update-cache",	"Update the repository cache" },
+	{ 'S', "simulate",	"Show what would be done without actually "
+				"doing it" },
 	{ 0x101, "progress",	"Show a progress bar" },
 	{ 0x10f, "progress-fd",	"Write progress to fd", required_argument, "FD" },
 	{ 0x110, "no-progress",	"Disable progress bar even for TTYs" },
_at_@ -59,8 +61,6 @@ static struct apk_option generic_options[] = {
 				"package removal" },
 	{ 0x103, "allow-untrusted", "Blindly install packages with untrusted "
 				"signatures or no signature at all" },
-	{ 0x104, "simulate",	"Show what would be done without actually "
-				"doing it" },
 	{ 0x105, "wait",	"Wait for TIME seconds to get an exclusive "
 				"repository lock before failing",
 				required_argument, "TIME" },
_at_@ -409,6 +409,9 @@ int main(int argc, char **argv)
 		case 'U':
 			apk_flags |= APK_UPDATE_CACHE;
 			break;
+		case 'S':
+			apk_flags |= APK_SIMULATE;
+			break;
 		case 0x101:
 			apk_flags |= APK_PROGRESS;
 			break;
_at_@ -424,9 +427,6 @@ int main(int argc, char **argv)
 		case 0x103:
 			apk_flags |= APK_ALLOW_UNTRUSTED;
 			break;
-		case 0x104:
-			apk_flags |= APK_SIMULATE;
-			break;
 		case 0x106:
 			apk_flags |= APK_PURGE;
 			break;
-- 
2.0.1
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Jul 04 2014 - 20:16:02 UTC