3 if ($version eq "--all" or $version eq "-a") {
8 if ($version eq "--only" or $version eq "-o") {
13 die "No version given" unless $version=~/\S/;
14 $date = `date "+%B %Y"`; chomp $date;
15 $year = `date "+%Y"` ; chomp $year;
17 print STDERR
"Changing version to \"$version\" and date to \"$date\" in all relevant files\n" ;
21 print STDERR
join("\n",glob("lisp/*.el")),"\n";
22 $cmd = qq{s/^(;; Version:)\\s+(\\S+)[ \t]*\$/\$1 $version/;s/^(\\(defconst org-version )"(\\S+)"/\$1"$version"/};
23 $c1 = "perl -pi -e '$cmd' lisp/*.el";
26 print STDERR
"doc/org.texi\n";
27 $cmd = qq{s/^(\\\@set VERSION)\\s+(\\S+)[ \t]*\$/\$1 $version/;s/^(\\\@set DATE)\\s+(.*)\$/\$1 $date/;};
28 $c1 = "perl -pi -e '$cmd' doc/org.texi";
31 print STDERR
"doc/orgguide.texi\n";
32 $cmd = qq{s/^(\\\@set VERSION)\\s+(\\S+)[ \t]*\$/\$1 $version/;s/^(\\\@set DATE)\\s+(.*)\$/\$1 $date/;};
33 $c1 = "perl -pi -e '$cmd' doc/orgguide.texi";
36 print STDERR
"doc/orgcard.tex\n";
37 $cmd = qq{s/^\\\\def\\\\orgversionnumber\\{\\S+\\}/\\\\def\\\\orgversionnumber{$version}/;s/\\\\def\\\\versionyear\\{\\S+\\}/\\\\def\\\\versionyear{$year}/;s/\\\\def\\\\year\\{\\S+\\}/\\\\def\\\\year{$year}/;};
38 $c1 = "perl -pi -e '$cmd' doc/orgcard.tex";
41 print STDERR
"README_DIST\n";
42 $cmd = qq{s/^(The version of this release is:)\\s+(\\S+)[ \t]*\$/\$1 $version/;};
43 $c1 = "perl -pi -e '$cmd' README_DIST";