diff options
author | Robert C. Helling <helling@atdotde.de> | 2020-11-15 22:12:21 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-03 13:26:55 -0800 |
commit | b39e77071e79b31996151434970e1baa5249c0a4 (patch) | |
tree | ad14301d93edcb4598f4a6ef3fd707aa7c88f58e /core/subsurfacestartup.c | |
parent | 31f0741ecc0013cd361683e7fad9bf2c8c166a13 (diff) | |
download | subsurface-b39e77071e79b31996151434970e1baa5249c0a4.tar.gz |
downloader: small improvements
Provide supported dive computer list on the command line
and actually call the cli download. Still not functional.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/subsurfacestartup.c')
-rw-r--r-- | core/subsurfacestartup.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c index 0b8385616..25fd03352 100644 --- a/core/subsurfacestartup.c +++ b/core/subsurfacestartup.c @@ -10,6 +10,8 @@ #include "git-access.h" #include "libdivecomputer/version.h" +extern void show_computer_list(); + struct preferences prefs, git_prefs; struct preferences default_prefs = { .cloud_base_url = "https://cloud.subsurface-divelog.org/", @@ -152,6 +154,7 @@ void print_files() const char *filename, *local_git; printf("\nFile locations:\n\n"); + printf("Cloud email:%s\n", prefs.cloud_storage_email); if (!empty_string(prefs.cloud_storage_email) && !empty_string(prefs.cloud_storage_password)) { filename = cloud_url(); @@ -265,6 +268,10 @@ void parse_argument(const char *arg) prefs.dive_computer.device = strdup(arg + sizeof("--device=") - 1); return; } + if (strncmp(arg, "--list-dc", sizeof("--list-dc") - 1) == 0) { + show_computer_list(); + return; + } #elif SUBSURFACE_MOBILE_DESKTOP if (strncmp(arg, "--testqml=", sizeof("--testqml=") - 1) == 0) { testqml = malloc(strlen(arg) - sizeof("--testqml=") + 1); |