3 if ($version eq "--all" or $version eq "-a") {
8 die "No version given" unless $version=~/\S/;
9 $date = `date "+%B %Y"`; chomp $date;
10 $year = `date "+%Y"` ; chomp $year;
12 print STDERR
"Changing version to \"$version\" and date to \"$date\" in all relevant files\n" ;
14 print STDERR
join("\n",glob("lisp/*.el")),"\n";
15 $cmd = qq{s/^(;; Version:)\\s+(\\S+)[ \t]*\$/\$1 $version/;s/^(\\(defconst org-version )"(\\S+)"/\$1"$version"/};
16 $c1 = "perl -pi -e '$cmd' lisp/*.el";
19 print STDERR
"doc/org.texi\n";
20 $cmd = qq{s/^(\\\@set VERSION)\\s+(\\S+)[ \t]*\$/\$1 $version/;s/^(\\\@set DATE)\\s+(.*)\$/\$1 $date/;};
21 $c1 = "perl -pi -e '$cmd' doc/org.texi";
24 print STDERR
"doc/orgcard.tex\n";
25 $cmd = qq{s/^\\\\def\\\\orgversionnumber\\{\\S+\\}/\\\\def\\\\orgversionnumber{$version}/;s/\\\\def\\\\versionyear\\{\\S+\\}/\\\\def\\\\versionyear{$year}/;s/\\\\def\\\\year\\{\\S+\\}/\\\\def\\\\year{$year}/;};
26 $c1 = "perl -pi -e '$cmd' doc/orgcard.tex";
29 print STDERR
"README_DIST\n";
30 $cmd = qq{s/^(The version of this release is:)\\s+(\\S+)[ \t]*\$/\$1 $version/;};
31 $c1 = "perl -pi -e '$cmd' README_DIST";
35 print STDERR
"ORGWEBPAGE/index.org\n";
36 $cmd = qq{s/^(\\* Current Version )\\(\\S+?\\)/\$1($version)/;s/^(The current version is)\\s+(\\S+)\\. /\$1 $version. /;s/org-.*?\\.(zip|tar\\.gz)/org-$version.\$1/g};
37 $c1 = "perl -pi -e '$cmd' ORGWEBPAGE/index.org";