File: uscan

package info (click to toggle)
pkg-perl-tools 0.85
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 796 kB
  • sloc: perl: 3,254; sh: 3,244; makefile: 144; python: 18
file content (61 lines) | stat: -rwxr-xr-x 1,319 bytes parent folder | download
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
#!/bin/sh

# copyright, licensing and documentation at the end

set -e
set -u

. "${DPT__SCRIPTS:-/usr/share/pkg-perl-tools}/lib/dpt-lib.sh"

[ -z "${1:-}" ] || die "No command line arguments supported"

USCAN="$(uscan --dehs|| true)"
if echo "$USCAN" | grep -q "<status>newer package available</status>"; then
    ORIG=$(echo "$USCAN" | grep "<target-path>"|sed -e's,</\?target-path>,,g')
    echo "Importing $ORIG"
    gbp import-orig "$ORIG"
fi

POD=<<'EOF'
=head1 NAME

dpt-uscan - a tiny wrapper around C<uscan> and C<gbp import-orig>

=head1 SYNOPSIS

B<dpt uscan>

=head1 DESCRIPTION

B<dpt uscan> calls L<uscan(1)> and then B<gbp import-orig>
if a newer upstream version was downloaded.

It is similar to L<dpt-import-orig(1)>, but without the upstream repository
integration.

Running B<dpt uscan> is equivalent to

 % uscan
 % gbp import-orig upstream-tarball

with the location of the newly downloaded tarball detected from uscan's
B<--dehs> output, and therefore is not hardcoded to F<../>, but depending on
uscan's configuration.

=head1 SEE ALSO

L<dpt-import-orig(1)>, L<uscan(1)>, L<devscripts.conf(5)>,
L<gbp-import-orig(1)>

=head1 COPYRIGHT & LICENSE

=over

=item Copyright 2017 Damyan Ivanov L<dam@debian.org>

=back

This program is free software, licensed under the same terms as perl.

=cut
EOF