diff --git a/src/cmds/install/cmd.c b/src/cmds/install/cmd.c index 188c78d..6bbdc0e 100644 --- a/src/cmds/install/cmd.c +++ b/src/cmds/install/cmd.c @@ -101,7 +101,7 @@ int download(struct install_options* param) return 0; /* fail */ }else{ - printf("download done:%s\n",url); + printf("\ndone\n"); } } s(impl_archive),s(url); diff --git a/src/download.c b/src/download.c index d9ab4d4..ad60288 100644 --- a/src/download.c +++ b/src/download.c @@ -2,9 +2,23 @@ #include #include +static int count=0; +static int block=10240; +static int fold=90; + static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) { int written = fwrite(ptr, size, nmemb, (FILE *)stream); + int current = count/block; + int dots; + int i; + count+=written; + for(i=current;i