chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support --version too
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 46099d2ed664a610a35c8ae83d3a604ad8982c80..42675366103fca6876e2ea93e1e9dae95b842776 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-28,6
+28,8
@@
use File::Basename;
use Dpkg::Version;
use POSIX;
use Dpkg::Version;
use POSIX;
+our $our_version = 'UNRELEASED'; ###substituted###
+
our $isuite = 'unstable';
our $idistro;
our $package;
our $isuite = 'unstable';
our $idistro;
our $package;
@@
-230,7
+232,7
@@
sub badusage {
exit 8;
}
exit 8;
}
-sub
helponly
() {
+sub
cmd_help
() {
print $helpmsg or die $!;
exit 0;
}
print $helpmsg or die $!;
exit 0;
}
@@
-1055,6
+1057,7
@@
sub build_maybe_quilt_fixup () {
my $ncommits = 3;
my $patchname = "auto-$version-$headref-$time";
my $msg = cmdoutput @git, qw(log), "-n$ncommits";
my $ncommits = 3;
my $patchname = "auto-$version-$headref-$time";
my $msg = cmdoutput @git, qw(log), "-n$ncommits";
+ mkpath '.git/dgit';
my $descfn = ".git/dgit/quilt-description.tmp";
open O, '>', $descfn or die "$descfn: $!";
$msg =~ s/\n/\n /g;
my $descfn = ".git/dgit/quilt-description.tmp";
open O, '>', $descfn or die "$descfn: $!";
$msg =~ s/\n/\n /g;
@@
-1198,6
+1201,11
@@
sub cmd_quilt_fixup {
build_maybe_quilt_fixup();
}
build_maybe_quilt_fixup();
}
+sub cmd_version {
+ print "dgit version $our_version\n" or die $!;
+ exit 0;
+}
+
sub parseopts () {
my $om;
while (@ARGV) {
sub parseopts () {
my $om;
while (@ARGV) {
@@
-1210,7
+1218,9
@@
sub parseopts () {
} elsif (m/^--no-sign$/) {
$sign=0;
} elsif (m/^--help$/) {
} elsif (m/^--no-sign$/) {
$sign=0;
} elsif (m/^--help$/) {
- helponly();
+ cmd_help();
+ } elsif (m/^--version$/) {
+ cmd_version();
} elsif (m/^--new$/) {
$new_package=1;
} elsif (m/^--(\w+)=(.*)/s &&
} elsif (m/^--new$/) {
$new_package=1;
} elsif (m/^--(\w+)=(.*)/s &&
@@
-1240,7
+1250,7
@@
sub parseopts () {
if (s/^-n/-/) {
$dryrun=1;
} elsif (s/^-h/-/) {
if (s/^-n/-/) {
$dryrun=1;
} elsif (s/^-h/-/) {
-
helponly
();
+
cmd_help
();
} elsif (s/^-D/-/) {
open DEBUG, ">&STDERR" or die $!;
$debug++;
} elsif (s/^-D/-/) {
open DEBUG, ">&STDERR" or die $!;
$debug++;