Skip to content

Commit

Permalink
-q replaces -s, and now also suppresses the warning about no relevant…
Browse files Browse the repository at this point in the history
… local data - useful for scripts.

-s remains as a deprecated synonym (but no warning).
  • Loading branch information
Colin Phipps committed Jan 18, 2009
1 parent 0d75da0 commit 8052a44
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions c/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Changes in 0.6
from Timothy Lee)
- explain status code errors better
- better URL handling
- add -q as a substitute for -s, as -q is more conventional (re wget). -q also
suppresses the 'no relevant local data' warning now.
- fix some warnings
- tidy up autoconf use

Expand Down
4 changes: 2 additions & 2 deletions c/README
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ compile farm for testing portability.

Also, thanks to �rsek L�szl�, James Antill, saul@alien-science.org, Kent Mein,
Marc Lehmann, Robert Lemmen, Ricardo Correia, Karl Kalleberg, Michael Stone,
Richard Lucassen and Duncan Mac-Vicar for useful feedback and bug reports for
previous versions.
Richard Lucassen, Duncan Mac-Vicar and Jari Aalto for useful feedback and bug
reports for previous versions.

6 changes: 4 additions & 2 deletions c/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ int main(int argc, char** argv) {
srand(getpid());
{
int opt;
while ((opt = getopt(argc,argv,"A:k:o:i:Vsu:")) != -1) {
while ((opt = getopt(argc,argv,"A:k:o:i:Vsqu:")) != -1) {
switch (opt) {
case 'A':
{ /* Scan string as hostname=username:password */
Expand Down Expand Up @@ -321,6 +321,7 @@ int main(int argc, char** argv) {
"Published under the Artistic License v2, see the COPYING file for details.\n");
exit(0);
case 's':
case 'q':
no_progress = 1;
break;
case 'u':
Expand Down Expand Up @@ -364,7 +365,8 @@ int main(int argc, char** argv) {
}
zsync_progress(zs, &local_used, NULL);
if (!local_used) {
fputs("No relevent local data found - I will be downloading the whole file. If that's not what you want, CTRL-C out. You should specify the local file is the old version of the file to download with -i (you might have to decompress it with gzip -d first). Or perhaps you just have no data that helps download the file\n",stderr);
if (!no_progress)
fputs("No relevent local data found - I will be downloading the whole file. If that's not what you want, CTRL-C out. You should specify the local file is the old version of the file to download with -i (you might have to decompress it with gzip -d first). Or perhaps you just have no data that helps download the file\n",stderr);
}
}

Expand Down
7 changes: 5 additions & 2 deletions c/doc/zsync.1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
zsync \- Partial/differential file download client over HTTP
.SH "SYNTAX"
.LP
zsync [ \-u \fIurl\fR ] [ \-i \fIinputfile\fP ] [ \-o \fIoutputfile\fP ] [ \-s ] [ \-k \fIfile\fR.zsync ] [ -A \fIhostname\fP=\fIusername\fR:\fIpassword\fR ] { \fIfilename\fP | \fIurl\fR }
zsync [ \-u \fIurl\fR ] [ \-i \fIinputfile\fP ] [ \-o \fIoutputfile\fP ] [ { \-s | \-q } ] [ \-k \fIfile\fR.zsync ] [ -A \fIhostname\fP=\fIusername\fR:\fIpassword\fR ] { \fIfilename\fP | \fIurl\fR }
.LP
zsync \-V
.SH "DESCRIPTION"
Expand Down Expand Up @@ -36,9 +36,12 @@ Indicates that zsync should save the zsync file that it downloads, with the give
\fB\-o\fR \fIoutputfile\fP
Override the default output file name.
.TP
\fB\-s\fR
\fB\-q\fR
Suppress the progress bar, download rate and ETA display.
.TP
\fB\-s\fR
Deprecated synonym for -q.
.TP
\fB\-u\fR \fIurl\fP
This specifies the referring URL. If you have a .zsync file locally (if you
downloaded it separately, with wget, say) and the .zsync file contains a
Expand Down

0 comments on commit 8052a44

Please sign in to comment.