Blob


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