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