]> pd.if.org Git - zpackage/blobdiff - doc/zpm-fetchurl.8
remove stray debug fprintf
[zpackage] / doc / zpm-fetchurl.8
index 8f9385990083b276214df5642fe636be0c6ea68b..d5487e5908eee133a29dbdd99140b2cb512677e6 100644 (file)
@@ -1,10 +1,19 @@
-.TH zpm-fetchurl 8 2019-02-16 "ZPM 0.4"
+.TH zpm-fetchurl 8 2019-03-05 "ZPM 0.7.0"
 .SH NAME
 zpm-fetchurl \- download files
 .SH SYNOPSIS
 .B zpm fetchurl
 [
 .SH NAME
 zpm-fetchurl \- download files
 .SH SYNOPSIS
 .B zpm fetchurl
 [
-.B -ISkKrOn
+.B -OIrRfnp
+]
+[
+.BI -L " redirlimit"
+]
+[
+.BI -z " lastmodfile"
+]
+[
+.BI \-U " useragent"
 ]
 [
 .BI -o file
 ]
 [
 .BI -o file
@@ -21,13 +30,21 @@ used.
 While this program can be used directly, it is intended for use by zpm scripts
 for downloading repositories and packages without requiring an external
 dependency.
 While this program can be used directly, it is intended for use by zpm scripts
 for downloading repositories and packages without requiring an external
 dependency.
+.PP
+URLs of the file scheme have an http style response header generated
+internally so the same code and output are used.
 .SH OPTIONS
 .TP
 .B \-I
 .SH OPTIONS
 .TP
 .B \-I
-output the response header only, implies -r
+output the response header only, implies \-r.  The output file
+is ignored and the header is written to stdout.
 .TP
 .B \-r
 .TP
 .B \-r
-output the entire response header, including the header
+output the entire response, including the header
+.TP
+.BI -L " limit"
+Limit the maximum number of redirects to \fIlimit\fR.  The default is
+50.
 .TP
 .B \-S
 output the response status code only
 .TP
 .B \-S
 output the response status code only
@@ -41,8 +58,8 @@ TLS, but zpm-fetchurl uses a trust on first use policy instead.  Root
 certificates are found by default in /etc/zpm/roots.pem, but the ZPM_ROOTFILE
 environment variable can be used to override this.
 .TP
 certificates are found by default in /etc/zpm/roots.pem, but the ZPM_ROOTFILE
 environment variable can be used to override this.
 .TP
-.BI \-R " limit"
-set the limit on following redirects, defaults to 50
+.B \-R
+Output the request header.
 .TP
 .BI \-z " path"
 Only download if remote is newer than the file given by path
 .TP
 .BI \-z " path"
 Only download if remote is newer than the file given by path
@@ -60,13 +77,18 @@ Only if newer.  Like \-z, except use the output file name, if any.
 .B \-f
 Fail silently on errors.
 .TP
 .B \-f
 Fail silently on errors.
 .TP
-.B \-#
-Output a progress bar.
+.B \-p \-#
+Output a progress bar.  A '#' is accepted for compatibility with curl.
+.TP
+.BI \-U " useragent"
+Set the User-Agent header to \fIuseragent\fR.
 .SH EXAMPLES
 .TP
 zpm fetchurl -o zpm-0.1.2.zpm https://zoranix.net/repo/packages/zpm-0.1.2.zpm
 .SH EXIT STATUS
 0 on success non zero on failure
 .SH EXAMPLES
 .TP
 zpm fetchurl -o zpm-0.1.2.zpm https://zoranix.net/repo/packages/zpm-0.1.2.zpm
 .SH EXIT STATUS
 0 on success non zero on failure
+.PP
+Failure is any exit status code >= 400.
 .SH FILES
 /var/lib/zpm/known_hosts
 ~/.zpm/known_hosts
 .SH FILES
 /var/lib/zpm/known_hosts
 ~/.zpm/known_hosts