Put a frame around the automatically generated TOC in beamer
[rgr-org-mode.git] / UTILITIES / set-version.pl
blob2658ddb888047ac10f430151d6a8e93c451df325
1 #!/usr/bin/perl
2 $version = $ARGV[0];
3 if ($version eq "--all" or $version eq "-a") {
4 $all = 1;
5 $version = $ARGV[1]
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";
17 system($c1);
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";
22 system($c1);
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";
27 system($c1);
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";
32 system($c1);
34 if ($all) {
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-[6-9].*?\\.(zip|tar\\.gz)/org-$version.\$1/g};
37 $c1 = "perl -pi -e '$cmd' ORGWEBPAGE/index.org";
38 system($c1);