summaryrefslogtreecommitdiff
path: root/win32/config_sh.PL
diff options
context:
space:
mode:
Diffstat (limited to 'win32/config_sh.PL')
-rw-r--r--win32/config_sh.PL19
1 files changed, 19 insertions, 0 deletions
diff --git a/win32/config_sh.PL b/win32/config_sh.PL
new file mode 100644
index 0000000000..020485d66a
--- /dev/null
+++ b/win32/config_sh.PL
@@ -0,0 +1,19 @@
+my %opt;
+while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/)
+ {
+ $opt{$1}=$2;
+ shift(@ARGV);
+ }
+
+if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true
+ $opt{PATCHLEVEL} = int($1 || 0);
+ $opt{SUBVERSION} = $2 || '00';
+}
+
+while (<>)
+ {
+ s/~([\w_]+)~/$opt{$1}/g;
+ $_ = "$1='$opt{$1}'\n" if (/^([\w_]+)=/ && exists($opt{$1}));
+ print;
+ }
+