summaryrefslogtreecommitdiffstats
path: root/scripts/dcmd.1
blob: 04380824397c8dc07819b90fc70a1b6b22e3fd1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.TH DCMD 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*-
.SH NAME
dcmd \- expand file lists of .dsc/.changes files in the command line
.SH SYNOPSIS
\fBdcmd\fR [\fIoptions\fR] [\fIcommand\fR] [\fIchanges-file\fR|\fIdsc-file\fR] ...
.SH DESCRIPTION
\fBdcmd\fR replaces any reference to a \fI.dsc\fR or \fI.changes\fR file in the
command line with the list of files in its 'Files' section, plus the
file itself.  It allows easy manipulation of all the files involved in
an upload (for \fI.changes\fR files) or a source package (for \fI.dsc\fR files).

If \fIcommand\fR is omitted (that is the first argument is an existing \fI.dsc\fR
or \fI.changes\fR file), the expanded list of files is printed to stdout, one file
by line. Useful for usage in backticks.
.SH OPTIONS
There are a number of options which may be used in order to select only a
subset of the files listed in the \fI.dsc\fR or \fI.changes\fR file. If a requested file
is not found, an error message will be printed.
.TP 14
.B \-\-dsc
Select the \fI.dsc\fR file.
.TP
.B \-\-schanges
Select \fI.changes\fR files for the 'source' architecture.
.TP
.B \-\-bchanges
Select \fI.changes\fR files for binary architectures.
.TP
.B \-\-changes
Select \fI.changes\fR files. Implies \fB\-\-schanges\fR and \fB\-\-bchanges\fR.
.TP
.B \-\-archdeb
Select architecture-dependent binary packages (\fI.deb\fR files).
.TP
.B \-\-indepdeb
Select architecture-independent binary packages (\fI.deb\fR files).
.TP
.B \-\-deb
Select binary packages (\fI.deb\fR files). Implies \fB\-\-archdeb\fR and \fB\-\-indepdeb\fR.
.TP
.B \-\-archudeb
Select architecture-dependent \fI.udeb\fR binary packages.
.TP
.B \-\-indepudeb
Select architecture-independent \fI.udeb\fR binary packages.
.TP
.B \-\-udeb
Select \fI.udeb\fR binary packages. Implies \fB\-\-archudeb\fR and \fB\-\-indepudeb\fR.
.TP
.BR \-\-tar ,\  \-\-orig
Select the upstream \fI.tar\fR file.
.TP
.BR \-\-diff ,\  \-\-debtar
Select the Debian \fI.debian.tar\fR or \fI.diff\fR file.
.PP
Each option may be prefixed by \fB\-\-no\fR to indicate that all files
\fInot\fR matching the specification should be selected.
.PP
It is not possible to combine positive filtering options (e.g. \fB\-\-dsc\fR)
and negative filtering options (e.g. \fB\-\-no\-changes\fR) in the same
\fBdcmd\fR invocation.
.TP
.B \-\-no\-fail\-on\-missing\fR, \fB\-r
If any of the requested files were not found, do not output an error.
.TP
.B \-\-package\fR, \fB\-p
Output package name part only.
.TP
.B \-\-sort\fR, \fB\-s
Sort output alphabetically.
.TP
.B \-\-tac\fR, \fB\-t
Reverse output order.

.SH "EXAMPLES"
Copy the result of a build to another machine:

.nf
$ dcmd scp rcs_5.7-23_amd64.changes elegiac:/tmp
rcs_5.7-23.dsc                  100%  490     0.5KB/s   00:00
rcs_5.7-23.diff.gz              100%   12KB  11.7KB/s   00:00
rcs_5.7-23_amd64.deb            100%  363KB 362.7KB/s   00:00
rcs_5.7-23_amd64.changes        100% 1095     1.1KB/s   00:00
$

$ dcmd \-\-diff \-\-deb scp rcs_5.7-23_amd64.changes elegiac:/tmp
rcs_5.7-23.diff.gz              100%   12KB  11.7KB/s   00:00
rcs_5.7-23_amd64.deb            100%  363KB 362.7KB/s   00:00
$
.fi

Check the contents of a source package:

.nf
$ dcmd md5sum rcs_5.7-23.dsc
8fd09ea9654cda128f8d5c337d3b8de7  rcs_5.7.orig.tar.gz
f0ceeae96603e823eacba6721a30b5c7  rcs_5.7-23.diff.gz
5241db1e231b1f43ae5514b63d2523f8  rcs_5.7-23.dsc
$

$ dcmd \-\-no\-diff md5sum rcs_5.7-23.dsc
8fd09ea9654cda128f8d5c337d3b8de7  rcs_5.7.orig.tar.gz
5241db1e231b1f43ae5514b63d2523f8  rcs_5.7-23.dsc
$
.fi

.SH "SEE ALSO"
.BR dpkg-genchanges (1),
.BR dpkg-source (1)
.SH AUTHOR
This program was written by Romain Francoise <rfrancoise@debian.org> and
is released under the GPL, version 2 or later.