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
|
#!/bin/sh
# Copyright & License below
. "${DPT__SCRIPTS:-/usr/share/pkg-perl-tools}/lib/dpt-lib.sh"
DIR=$(mktemp -d)
trap "rm -rf '$DIR'" QUIT TERM EXIT
apt_get_source() {
info "Trying apt-get source $PKG=$VER";
( cd "$DIR" && apt-get source -qq --download-only --tar-only "$PKG=$VER")
}
if ! apt_get_source ; then
warn "Falling back to uscan"
uscan --verbose --force-download --download-current-version \
--rename --destdir="$DIR"
fi
pristine-tar commit "$DIR/${PKG}_${UVER}".orig* "upstream/$UVER"
exit 0
POD=<<'EOF'
=head1 NAME
dpt-missing-pristine-tar - fix missing pristine-tar information
=head1 SYNOPSIS
B<dpt missing-pristine-tar>
=head1 DESCRIPTION
B<dpt missing-pristine-tar> fixes missing L<pristine-tar(1)> information by
downloading and importing upstream sources.
The download first tries L<apt-get source|apt-get(1)> and if that fails,
falls back to L<uscan(1)>.
=head1 COPYRIGHT & LICENSE
Copyright 2011 gregor herrmann <gregoa@debian.org>
2022 Damyan Ivanov <dmn@debian.org>
License: Artistic | GPL-1+
=cut
EOF
|