]> pd.if.org Git - zpackage/blob - doc/zpm-fetchurl.8
fix stray quote
[zpackage] / doc / zpm-fetchurl.8
1 .TH zpm-fetchurl 8 2019-03-05 "ZPM 0.7.0"
2 .SH NAME
3 zpm-fetchurl \- download files
4 .SH SYNOPSIS
5 .B zpm fetchurl
6 [
7 .B -OIrRfnp
8 ]
9 [
10 .BI -L " redirlimit"
11 ]
12 [
13 .BI -z " lastmodfile"
14 ]
15 [
16 .BI \-U " useragent"
17 [
18 .BI -o file
19 ]
20 .I [ url ]
21 .SH DESCRIPTION
22 \fBzpm-fetchurl\fR downloads files
23 .PP
24 \fBzpm-fetchurl\fR understands http, https, and file type urls.
25 For https, it uses a trust on first use model for ssl certificates, but a more
26 common model verifying via root certificates, or no verfication can also be
27 used.
28 .PP
29 While this program can be used directly, it is intended for use by zpm scripts
30 for downloading repositories and packages without requiring an external
31 dependency.
32 .SH OPTIONS
33 .TP
34 .B \-I
35 output the response header only, implies -r
36 .TP
37 .B \-r
38 output the entire response, including the header
39 .TP
40 .BI -L " limit"
41 Limit the maximum number of redirects to \fIlimit\fR.  The default is
42 50.
43 .TP
44 .B \-S
45 output the response status code only
46 .TP
47 .B \-k
48 Don't verify any certificates.
49 .TP
50 .B \-K
51 Verify certificates via root certificates.  This is normally the default for
52 TLS, but zpm-fetchurl uses a trust on first use policy instead.  Root
53 certificates are found by default in /etc/zpm/roots.pem, but the ZPM_ROOTFILE
54 environment variable can be used to override this.
55 .TP
56 .B \-R
57 Output the request header.
58 .TP
59 .BI \-z " path"
60 Only download if remote is newer than the file given by path
61 .TP
62 .BI \-o " path"
63 Write the output to the file given by \fIpath\fR.  Output is
64 written to stdout by default.
65 .TP
66 .B \-O
67 Calculate the output file name from the url.
68 .TP
69 .B \-n
70 Only if newer.  Like \-z, except use the output file name, if any.
71 .TP
72 .B \-f
73 Fail silently on errors.
74 .TP
75 .B \-p \-#
76 Output a progress bar.  A '#' is accepted for compatibility with curl.
77 .SH EXAMPLES
78 .TP
79 zpm fetchurl -o zpm-0.1.2.zpm https://zoranix.net/repo/packages/zpm-0.1.2.zpm
80 .SH EXIT STATUS
81 0 on success non zero on failure
82 .SH FILES
83 /var/lib/zpm/known_hosts
84 ~/.zpm/known_hosts
85 /etc/zpm/roots.pem
86 .SH ENVIRONMENT
87 ZPM_KNOWNHOSTS
88 ZPM_ROOTFILE
89 .SH AUTHOR
90 Nathan Wagner
91 .SH SEE ALSO
92 zpm(8)