summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2011-03-19 16:57:13 +0100
committerGravatar Martin Szulecki2011-03-19 16:57:13 +0100
commit273a9d402ed05d140bcfc76548b432345c49d752 (patch)
treeceb3fbbb071197e9e187f8f675f1a5f5d6d41d24
parentfdb52bc07d783dcb26b7cb6253295e479c846497 (diff)
downloadideviceinstaller-273a9d402ed05d140bcfc76548b432345c49d752.tar.gz
ideviceinstaller-273a9d402ed05d140bcfc76548b432345c49d752.tar.bz2
Alter usage output to closer match other tools and lowercase short debug option
-rw-r--r--src/ideviceinstaller.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 3762877..d8c68ba 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -200,28 +200,29 @@ static void print_usage(int argc, char **argv)
200 200
201 name = strrchr(argv[0], '/'); 201 name = strrchr(argv[0], '/');
202 printf("Usage: %s OPTIONS\n", (name ? name + 1 : argv[0])); 202 printf("Usage: %s OPTIONS\n", (name ? name + 1 : argv[0]));
203 printf("Manage apps on an iDevice.\n\n");
203 printf 204 printf
204 (" -U|--uuid UUID\tTarget specific device by its 40-digit device UUID.\n" 205 (" -U, --uuid UUID\tTarget specific device by its 40-digit device UUID.\n"
205 " -l|--list-apps\tList apps, possible options:\n" 206 " -l, --list-apps\tList apps, possible options:\n"
206 " -o list_user\t- list user apps only (this is the default)\n" 207 " -o list_user\t- list user apps only (this is the default)\n"
207 " -o list_system\t- list system apps only\n" 208 " -o list_system\t- list system apps only\n"
208 " -o list_all\t- list all types of apps\n" 209 " -o list_all\t- list all types of apps\n"
209 " -o xml\t\t- print full output as xml plist\n" 210 " -o xml\t\t- print full output as xml plist\n"
210 " -i|--install ARCHIVE\tInstall app from package file specified by ARCHIVE.\n" 211 " -i, --install ARCHIVE\tInstall app from package file specified by ARCHIVE.\n"
211 " -u|--uninstall APPID\tUninstall app specified by APPID.\n" 212 " -u, --uninstall APPID\tUninstall app specified by APPID.\n"
212 " -g|--upgrade APPID\tUpgrade app specified by APPID.\n" 213 " -g, --upgrade APPID\tUpgrade app specified by APPID.\n"
213 " -L|--list-archives\tList archived applications, possible options:\n" 214 " -L, --list-archives\tList archived applications, possible options:\n"
214 " -o xml\t\t- print full output as xml plist\n" 215 " -o xml\t\t- print full output as xml plist\n"
215 " -a|--archive APPID\tArchive app specified by APPID, possible options:\n" 216 " -a, --archive APPID\tArchive app specified by APPID, possible options:\n"
216 " -o uninstall\t- uninstall the package after making an archive\n" 217 " -o uninstall\t- uninstall the package after making an archive\n"
217 " -o app_only\t- archive application data only\n" 218 " -o app_only\t- archive application data only\n"
218 " -o copy=PATH\t- copy the app archive to directory PATH when done\n" 219 " -o copy=PATH\t- copy the app archive to directory PATH when done\n"
219 " -o remove\t- only valid when copy=PATH is used: remove after copy\n" 220 " -o remove\t- only valid when copy=PATH is used: remove after copy\n"
220 " -r|--restore APPID\tRestore archived app specified by APPID\n" 221 " -r, --restore APPID\tRestore archived app specified by APPID\n"
221 " -R|--remove-archive APPID Remove app archive specified by APPID\n" 222 " -R, --remove-archive APPID Remove app archive specified by APPID\n"
222 " -o|--options\t\tPass additional options to the specified command.\n" 223 " -o, --options\t\tPass additional options to the specified command.\n"
223 " -h|--help\t\tprints usage information\n" 224 " -h, --help\t\tprints usage information\n"
224 " -D|--debug\t\tenable communication debugging\n" "\n"); 225 " -d, --debug\t\tenable communication debugging\n" "\n");
225} 226}
226 227
227static void parse_opts(int argc, char **argv) 228static void parse_opts(int argc, char **argv)
@@ -238,13 +239,13 @@ static void parse_opts(int argc, char **argv)
238 {"restore", 1, NULL, 'r'}, 239 {"restore", 1, NULL, 'r'},
239 {"remove-archive", 1, NULL, 'R'}, 240 {"remove-archive", 1, NULL, 'R'},
240 {"options", 1, NULL, 'o'}, 241 {"options", 1, NULL, 'o'},
241 {"debug", 0, NULL, 'D'}, 242 {"debug", 0, NULL, 'd'},
242 {NULL, 0, NULL, 0} 243 {NULL, 0, NULL, 0}
243 }; 244 };
244 int c; 245 int c;
245 246
246 while (1) { 247 while (1) {
247 c = getopt_long(argc, argv, "hU:li:u:g:La:r:R:o:D", longopts, 248 c = getopt_long(argc, argv, "hU:li:u:g:La:r:R:o:d", longopts,
248 (int *) 0); 249 (int *) 0);
249 if (c == -1) { 250 if (c == -1) {
250 break; 251 break;
@@ -305,7 +306,7 @@ static void parse_opts(int argc, char **argv)
305 options = newopts; 306 options = newopts;
306 } 307 }
307 break; 308 break;
308 case 'D': 309 case 'd':
309 idevice_set_debug_level(1); 310 idevice_set_debug_level(1);
310 break; 311 break;
311 default: 312 default: