5 # Copyright © 2023 Guillem Jover <guillem@debian.org>
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <https://www.gnu.org/licenses/>.
25 use Dpkg
::ErrorHandling
;
28 textdomain
('dpkg-dev');
31 printf g_
("Debian %s version %s.\n"), $Dpkg::PROGNAME
, $Dpkg::PROGVERSION
;
34 This is free software; see the GNU General Public License version 2 or
35 later for copying conditions. There is NO warranty.
41 'Usage: %s [<command>]')
44 clean clean dpkg generated artifacts from the build tree.
45 --help show this help message.
46 --version show the version.
53 my $arg = shift @ARGV;
54 if ($arg eq 'clean') {
55 usageerr
(g_
('two commands specified: %s and %s'), $1, $action)
58 } elsif ($arg eq '-?' or $arg eq '--help') {
61 } elsif ($arg eq '--version') {
65 usageerr
(g_
("unknown option '%s'"), $arg);
69 usageerr
(g_
('missing action')) unless $action;
71 my $bt = Dpkg
::BuildTree
->new();
73 if ($action eq 'clean') {