mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-15 04:11:07 +00:00
* Add pull-revu-source and doc/pull-revu-source.1
* Update debian/copyright to include pull-revu-source
This commit is contained in:
parent
48f591a4bb
commit
e81c4a1ae7
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -46,7 +46,11 @@ ubuntu-dev-tools (0.76) UNRELEASED; urgency=low
|
||||
- debian/rules: set DEB_PYTHON_SYSTEM to pysupport.
|
||||
- ubuntu-dev-tools.preinst: remove stale pycentral files on upgrades.
|
||||
|
||||
-- Michael Bienia <geser@ubuntu.com> Sat, 29 Aug 2009 11:12:01 +0200
|
||||
[ Nathan Handler ]
|
||||
* Add pull-revu-source and doc/pull-revu-source.1
|
||||
* Update debian/copyright to include pull-revu-source
|
||||
|
||||
-- Nathan Handler <nhandler@ubuntu.com> Sun, 30 Aug 2009 17:24:23 +0000
|
||||
|
||||
ubuntu-dev-tools (0.75) karmic; urgency=low
|
||||
|
||||
|
4
debian/copyright
vendored
4
debian/copyright
vendored
@ -63,8 +63,8 @@ License v2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
|
||||
dch-repeat, get-branches, get-build-deps, manage-credentials, massfile,
|
||||
mk-sbuild-lv, ppaput, pull-debian-debdiff, pull-debian-source, pull-lp-source,
|
||||
suspicious-source and what-patch are licensed under the GNU General Public
|
||||
License, version 3:
|
||||
pull-revu-source, suspicious-source and what-patch are licensed under the GNU
|
||||
General Public License, version 3:
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
27
doc/pull-revu-source.1
Normal file
27
doc/pull-revu-source.1
Normal file
@ -0,0 +1,27 @@
|
||||
.TH PULL\-REVU\-SOURCE "1" "30 August 2009" "ubuntu-dev-tools"
|
||||
|
||||
.SH NAME
|
||||
pull\-revu\-source \- download a source package from REVU
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B pull\-revu\-source \fR[\fB\-h\fR]\fB <\fBsource package\fR>
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBpull\-revu\-source\fR downloads and extracts the latest version of
|
||||
<\fBsource package\fR> from REVU.
|
||||
|
||||
.SH OPTIONS
|
||||
Listed below are the command line options for pull\-revu\-source:
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Display the usage instructions and exit.
|
||||
.TP
|
||||
.B <source package>
|
||||
This is the source package that you would like to be downloaded from Debian.
|
||||
|
||||
.SH AUTHOR
|
||||
.PP
|
||||
\fBpull\-revu\-source\fR and this manual page were written by Nathan Handler
|
||||
<nhandler@ubuntu.com>. \fBpull\-revu\-source\fR is based on \fBrevupull\fR in
|
||||
\fBkubuntu\-dev\-tools\fR, written by Harald Sitter <apachelogger@ubuntu.com>.
|
||||
Both are released under the GNU General Public License, version 3 or later.
|
61
pull-revu-source
Executable file
61
pull-revu-source
Executable file
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/perl
|
||||
# Script Name: pull-revu-source
|
||||
# Author: Nathan Handler <nhandler@ubuntu.com>
|
||||
# Usage: pull-revu-source <source package>
|
||||
# Copyright (C) 2009 Nathan Handler <nhandler@ubuntu.com>
|
||||
# Based on revupull in kubuntu-dev-tools,
|
||||
# written by Harald Sitter <apachelogger@ubuntu.com>
|
||||
# License: GNU General Public License
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# On Debian GNU/Linux systems, the complete text of the GNU General
|
||||
# Public License can be found in the /usr/share/common-licenses/GPL-3 file.
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use LWP::Simple;
|
||||
use Getopt::Long;
|
||||
|
||||
die("Please install 'devscripts'\n") if(! grep -x "$_/dget", split(':',$ENV{'PATH'}));
|
||||
|
||||
my $REVU = "revu.ubuntuwire.com";
|
||||
|
||||
my($package) = lc($ARGV[0]) || usage();
|
||||
my($help)=0;
|
||||
GetOptions('help' => \$help);
|
||||
usage() if($help);
|
||||
|
||||
my $url = "http://" . $REVU . "/p/" . $package;
|
||||
|
||||
dget(constructURL(getPage($url),'dsc'));
|
||||
|
||||
sub getPage {
|
||||
my($url) = @_;
|
||||
my($page)=get($url);
|
||||
die("Could Not Get $url") unless (defined $page);
|
||||
return $page;
|
||||
}
|
||||
|
||||
sub constructURL {
|
||||
my($page,$extension) = @_;
|
||||
my($url) = $page =~ m/a href=\"(.*?\.$extension)\"/im;
|
||||
die("No URL Ending in $extension") unless(defined $url);
|
||||
return "http://" . $REVU . $url;
|
||||
}
|
||||
|
||||
sub dget {
|
||||
my($dsc) = @_;
|
||||
exec("dget -xu $dsc");
|
||||
}
|
||||
|
||||
sub usage {
|
||||
my($name)=basename($0);
|
||||
die("USAGE: $name [-h] <source package>\n");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user