Blame


1 ec8f1d27 2023-12-27 benni .\"
2 ec8f1d27 2023-12-27 benni .\" Copyright (c) 2023 Benjamin Stürz
3 ec8f1d27 2023-12-27 benni .\"
4 ec8f1d27 2023-12-27 benni .\" Permission to use, copy, modify, and distribute this software for any
5 ec8f1d27 2023-12-27 benni .\" purpose with or without fee is hereby granted, provided that the above
6 ec8f1d27 2023-12-27 benni .\" copyright notice and this permission notice appear in all copies.
7 ec8f1d27 2023-12-27 benni .\"
8 ec8f1d27 2023-12-27 benni .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 ec8f1d27 2023-12-27 benni .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 ec8f1d27 2023-12-27 benni .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 ec8f1d27 2023-12-27 benni .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 ec8f1d27 2023-12-27 benni .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 ec8f1d27 2023-12-27 benni .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 ec8f1d27 2023-12-27 benni .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 ec8f1d27 2023-12-27 benni .\"
16 ec8f1d27 2023-12-27 benni .Dd $Mdocdate$
17 ec8f1d27 2023-12-27 benni .Dt GOT-ARCHIVE 1
18 ec8f1d27 2023-12-27 benni .Os
19 ec8f1d27 2023-12-27 benni .Sh NAME
20 ec8f1d27 2023-12-27 benni .Nm got-archive
21 ec8f1d27 2023-12-27 benni .Nd git-archive(1) clone for got-archive(1)
22 ec8f1d27 2023-12-27 benni .Sh SYNOPSIS
23 67f102f4 2023-12-28 benni .Nm
24 67f102f4 2023-12-28 benni .Op Fl fs
25 ec8f1d27 2023-12-27 benni .Op Fl o Ar outdir
26 ec8f1d27 2023-12-27 benni .Op Fl t Ar tmpdir
27 ec8f1d27 2023-12-27 benni .Ar repo
28 67f102f4 2023-12-28 benni .Op Ar ref...
29 67f102f4 2023-12-28 benni .Nm
30 67f102f4 2023-12-28 benni .Fl a
31 67f102f4 2023-12-28 benni .Op Fl fs
32 67f102f4 2023-12-28 benni .Op Fl o Ar outdir
33 67f102f4 2023-12-28 benni .Op Fl t Ar tmpdir
34 67f102f4 2023-12-28 benni .Ar repo
35 67f102f4 2023-12-28 benni .Nm
36 67f102f4 2023-12-28 benni .Fl V
37 ec8f1d27 2023-12-27 benni .Sh DESCRIPTION
38 ec8f1d27 2023-12-27 benni .Nm
39 67f102f4 2023-12-28 benni is a small helper script for got(1) that simplifies the creation of tarballs for repositories.
40 ec8f1d27 2023-12-27 benni .Pp
41 67f102f4 2023-12-28 benni A
42 67f102f4 2023-12-28 benni .Ar ref
43 67f102f4 2023-12-28 benni can be
44 67f102f4 2023-12-28 benni .Dl - a commit hash,
45 67f102f4 2023-12-28 benni .Dl - a branch,
46 67f102f4 2023-12-28 benni .Dl - a tag,
47 67f102f4 2023-12-28 benni .Dl - or HEAD (refering to eg. master or main)
48 67f102f4 2023-12-28 benni .Pp
49 ec8f1d27 2023-12-27 benni The options are as follows:
50 ec8f1d27 2023-12-27 benni .Bl -tag -width -Ds
51 67f102f4 2023-12-28 benni .It Fl a
52 67f102f4 2023-12-28 benni Generate tarballs for all tags in
53 67f102f4 2023-12-28 benni .Ar repo .
54 67f102f4 2023-12-28 benni .It Fl f
55 67f102f4 2023-12-28 benni Overwrite existing tarballs.
56 ec8f1d27 2023-12-27 benni .It Fl o Ar outdir
57 ec8f1d27 2023-12-27 benni An existing directory in which the tarball will be created.
58 ec8f1d27 2023-12-27 benni By default, this will be the current working directory.
59 ec8f1d27 2023-12-27 benni .It Fl s
60 ec8f1d27 2023-12-27 benni Strip a preceding "v" from the
61 67f102f4 2023-12-28 benni .Ar ref .
62 67f102f4 2023-12-28 benni This is useful for tags that like v1.0.
63 ec8f1d27 2023-12-27 benni .It Fl t Ar tmpdir
64 ec8f1d27 2023-12-27 benni A temporary directory used for the checkout.
65 ec8f1d27 2023-12-27 benni By default, this will be
66 ec8f1d27 2023-12-27 benni .Ar /tmp/got-archive .
67 ec8f1d27 2023-12-27 benni .It Fl V
68 ec8f1d27 2023-12-27 benni Print the version of got-archive(1) and exit.
69 ec8f1d27 2023-12-27 benni .Sh EXIT STATUS
70 ec8f1d27 2023-12-27 benni .Ex -std got-archive
71 ec8f1d27 2023-12-27 benni .Sh EXAMPLES
72 67f102f4 2023-12-28 benni Create a tarball for the master/main branch of
73 ec8f1d27 2023-12-27 benni .Pa /var/git/example.git .
74 ec8f1d27 2023-12-27 benni .Pp
75 ec8f1d27 2023-12-27 benni .Dl $ got-archive /var/git/example.git
76 ec8f1d27 2023-12-27 benni .Pp
77 67f102f4 2023-12-28 benni Generate tarballs for all tags of
78 ec8f1d27 2023-12-27 benni .Pa /var/git/example.git
79 ec8f1d27 2023-12-27 benni into
80 ec8f1d27 2023-12-27 benni .Pa /mnt .
81 ec8f1d27 2023-12-27 benni .Pp
82 67f102f4 2023-12-28 benni .Dl $ got-archive -a -o /mnt /var/git/example.git
83 67f102f4 2023-12-28 benni .Pp
84 67f102f4 2023-12-28 benni Generate tarballs for all tags in all repositories in
85 67f102f4 2023-12-28 benni .Pa /var/git .
86 67f102f4 2023-12-28 benni .Pp
87 67f102f4 2023-12-28 benni .Dl $ for r in /var/git/*.git; do got-archive -ao /mnt """$r"""; done
88 ec8f1d27 2023-12-27 benni .Sh SEE ALSO
89 ec8f1d27 2023-12-27 benni .Xr got 1 ,
90 ec8f1d27 2023-12-27 benni .Xr tar 1
91 ec8f1d27 2023-12-27 benni .Sh AUTHORS
92 ec8f1d27 2023-12-27 benni .An Benjamin Stürz Aq Mt benni@stuerz.xyz