chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README mentions Python 2.5 now
[disorder]
/
scripts
/
setversion
diff --git
a/scripts/setversion
b/scripts/setversion
index 142f7da250be3172ab544daf0ca7d866b7a91dc8..c3f0a374e6136ae555d34adebb344e07e4c59d4c 100755
(executable)
--- a/
scripts/setversion
+++ b/
scripts/setversion
@@
-1,6
+1,6
@@
#! /usr/bin/perl -w
#
#! /usr/bin/perl -w
#
-# scripts/setversion VERSION
+# scripts/setversion VERSION
[DESCRIPTION [DISTRIBUTION]]
#
# Sets a new version number, including a debian/changelog entry (albeit
# a rather terse and informal one).
#
# Sets a new version number, including a debian/changelog entry (albeit
# a rather terse and informal one).
@@
-9,6
+9,18
@@
use strict;
use POSIX qw(strftime uname);
my $version = shift;
use POSIX qw(strftime uname);
my $version = shift;
+my $description;
+my $distribution;
+if(@ARGV > 0) {
+ $description = shift;
+} else {
+ $description = "DisOrder $version";
+}
+if(@ARGV > 0) {
+ $distribution = shift;
+} else {
+ $distribution = "unstable";
+}
my $hostname = (uname)[1];
$hostname = (gethostbyname($hostname))[0];
my $hostname = (uname)[1];
$hostname = (gethostbyname($hostname))[0];
@@
-16,6
+28,9
@@
my $logname = (getpwuid($<))[0];
my $name = (getpwuid($<))[6];
$name =~ s/,.*//;
my $email = "$logname\@$hostname";
my $name = (getpwuid($<))[6];
$name =~ s/,.*//;
my $email = "$logname\@$hostname";
+if(exists $ENV{"EMAIL"}) {
+ $email = $ENV{"EMAIL"};
+}
my $date = strftime("%a, %d %b %Y %H:%M:%S %z", localtime);
sub input {
my $date = strftime("%a, %d %b %Y %H:%M:%S %z", localtime);
sub input {
@@
-48,9
+63,9
@@
output("configure.ac", \@c);
@c = input("debian/changelog");
unshift(@c,
@c = input("debian/changelog");
unshift(@c,
- "disorder ($version)
unstable
; urgency=low\n",
+ "disorder ($version)
$distribution
; urgency=low\n",
"\n",
"\n",
- " *
Disorder $vers
ion\n",
+ " *
$descript
ion\n",
"\n",
" -- $name <$email> $date\n",
"\n");
"\n",
" -- $name <$email> $date\n",
"\n");