1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-11-22 16:56:16 +00:00

Cleaned up CommandLineOptions.

This commit is contained in:
Fabian Schlenz 2016-07-11 18:17:42 +02:00
parent 6499aed3c1
commit fefebc9cd6

View File

@ -18,18 +18,19 @@ package de.fabianonline.telegram_backup;
class CommandLineOptions {
public static boolean cmd_console = false;
public static String val_account = null;
public static boolean cmd_help = false;
public static boolean cmd_login = false;
public static boolean cmd_debug = false;
public static boolean cmd_list_accounts = false;
public static Integer val_limit_messages = null;
public static String val_target = null;
public static boolean cmd_version = false;
public static String val_export = null;
public static boolean cmd_license = false;
public static boolean cmd_daemon = false;
public static String val_account = null;
public static Integer val_limit_messages = null;
public static String val_target = null;
public static String val_export = null;
public static void parseOptions(String[] args) {
String last_cmd = null;
@ -37,17 +38,16 @@ class CommandLineOptions {
if (last_cmd != null) {
switch (last_cmd) {
case "--account":
val_account = arg;
break;
val_account = arg; break;
case "--limit-messages":
val_limit_messages = Integer.parseInt(arg);
break;
val_limit_messages = Integer.parseInt(arg); break;
case "--target":
val_target = arg;
break;
val_target = arg; break;
case "--export":
val_export = arg;
break;
val_export = arg; break;
}
last_cmd = null;
continue;