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/orgcard.tex\n";
32 $cmd = qq{s/^\\\\def\\\\orgversionnumber\\{\\S+\\}/\\\\def\\\\orgversionnumber{$version}/;s/\\\\def\\\\versionyear\\{\\S+\\}/\\\\def\\\\versionyear{$year}/;s/\\\\def\\\\year\\{\\S+\\}/\\\\def\\\\year{$year}/;};
33 $c1 = "perl -pi -e '$cmd' doc/orgcard.tex";
36 print STDERR
"README_DIST\n";
37 $cmd = qq{s/^(The version of this release is:)\\s+(\\S+)[ \t]*\$/\$1 $version/;};
38 $c1 = "perl -pi -e '$cmd' README_DIST";
43 print STDERR
"ORGWEBPAGE/index.org\n";
44 $cmd = qq{s/^(\\* Current Version )\\(\\S+?\\)/\$1($version)/;s/^(The current version is)\\s+(\\S+)\\. /\$1 $version. /;s/org-[6-9].*?\\.(zip|tar\\.gz)/org-$version.\$1/g};
45 $c1 = "perl -pi -e '$cmd' ORGWEBPAGE/index.org";