summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-09-08 15:08:14 +0200
committerGravatar Martin Szulecki2012-10-21 14:19:50 +0200
commitb3a679c7c6a2ab30aaac27abd79428b557511bf2 (patch)
treeba25365498bbcc1ca619879909b096829e7e9b7f
parentfe0b5c23621693b54a413ebe58fcb44dbd81b006 (diff)
downloadlibimobiledevice-b3a679c7c6a2ab30aaac27abd79428b557511bf2.tar.gz
libimobiledevice-b3a679c7c6a2ab30aaac27abd79428b557511bf2.tar.bz2
ideviceprovision: Change usage of arguments to not use commands like options
-rw-r--r--tools/ideviceprovision.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c
index 02b4d1e..b9e255c 100644
--- a/tools/ideviceprovision.c
+++ b/tools/ideviceprovision.c
@@ -34,18 +34,20 @@ static void print_usage(int argc, char **argv)
34 char *name = NULL; 34 char *name = NULL;
35 35
36 name = strrchr(argv[0], '/'); 36 name = strrchr(argv[0], '/');
37 printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0])); 37 printf("Usage: %s [OPTIONS] COMMAND\n", (name ? name + 1: argv[0]));
38 printf("Display the current date or set it on a device.\n\n"); 38 printf("Manage provisioning profiles on a device.\n\n");
39 printf(" -d, --debug\t\tenable communication debugging\n"); 39 printf(" Where COMMAND is one of:\n");
40 printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n"); 40 printf(" install FILE\tInstalls the provisioning profile specified by FILE.\n");
41 printf(" -i, --install FILE\tInstalls the provisioning profile specified by FILE.\n"); 41 printf(" \tA valid .mobileprovision file is expected.\n");
42 printf(" \tA valid .mobileprovision file is expected.\n"); 42 printf(" list\t\tGet a list of all provisioning profiles on the device.\n");
43 printf(" -l, --list\t\tGet a list of all provisioning profiles on the device.\n"); 43 printf(" copy PATH\tRetrieves all provisioning profiles from the device and\n");
44 printf(" -c, --copy PATH\tRetrieves all provisioning profiles from the device and\n"); 44 printf(" \tstores them into the existing directory specified by PATH.\n");
45 printf(" \tstores them into the existing directory specified by PATH.\n"); 45 printf(" \tThe files will be stored as UUID.mobileprovision\n");
46 printf(" \tThe files will be stored as UUID.mobileprovision\n"); 46 printf(" remove UUID\tRemoves the provisioning profile identified by UUID.\n\n");
47 printf(" -r, --remove UUID\tRemoves the provisioning profile identified by UUID.\n"); 47 printf(" The following OPTIONS are accepted:\n");
48 printf(" -h, --help\t\tprints usage information\n"); 48 printf(" -d, --debug enable communication debugging\n");
49 printf(" -u, --udid UDID target specific device by its 40-digit device UDID\n");
50 printf(" -h, --help prints usage information\n");
49 printf("\n"); 51 printf("\n");
50} 52}
51 53
@@ -209,7 +211,7 @@ int main(int argc, char *argv[])
209 udid = argv[i]; 211 udid = argv[i];
210 continue; 212 continue;
211 } 213 }
212 else if (!strcmp(argv[i], "-i") || !strcmp(argv[i], "--install")) { 214 else if (!strcmp(argv[i], "install")) {
213 i++; 215 i++;
214 if (!argv[i] || (strlen(argv[i]) < 1)) { 216 if (!argv[i] || (strlen(argv[i]) < 1)) {
215 print_usage(argc, argv); 217 print_usage(argc, argv);
@@ -219,10 +221,10 @@ int main(int argc, char *argv[])
219 op = OP_INSTALL; 221 op = OP_INSTALL;
220 continue; 222 continue;
221 } 223 }
222 else if (!strcmp(argv[i], "-l") || !strcmp(argv[i], "--list")) { 224 else if (!strcmp(argv[i], "list")) {
223 op = OP_LIST; 225 op = OP_LIST;
224 } 226 }
225 else if (!strcmp(argv[i], "-c") || !strcmp(argv[i], "--copy")) { 227 else if (!strcmp(argv[i], "copy")) {
226 i++; 228 i++;
227 if (!argv[i] || (strlen(argv[i]) < 1)) { 229 if (!argv[i] || (strlen(argv[i]) < 1)) {
228 print_usage(argc, argv); 230 print_usage(argc, argv);
@@ -232,7 +234,7 @@ int main(int argc, char *argv[])
232 op = OP_COPY; 234 op = OP_COPY;
233 continue; 235 continue;
234 } 236 }
235 else if (!strcmp(argv[i], "-r") || !strcmp(argv[i], "--remove")) { 237 else if (!strcmp(argv[i], "remove")) {
236 i++; 238 i++;
237 if (!argv[i] || (strlen(argv[i]) < 1)) { 239 if (!argv[i] || (strlen(argv[i]) < 1)) {
238 print_usage(argc, argv); 240 print_usage(argc, argv);