diff options
Diffstat (limited to 'win/rename_installer.pl')
-rw-r--r-- | win/rename_installer.pl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/win/rename_installer.pl b/win/rename_installer.pl new file mode 100644 index 000000000..678b11b8b --- /dev/null +++ b/win/rename_installer.pl @@ -0,0 +1,35 @@ +#!perl
+
+open(FH,"<../src/version.sh") or die("Can't open version.sh");
+while (chomp($v = <FH>))
+{
+ $version = $v if $v =~ /^echo/;
+}
+close FH;
+
+$version =~ /InspIRCd-(\d+)\.(\d+)\.(\d+)([ab\+])/;
+
+$v1 = $1;
+$v2 = $2;
+$v3 = $3;
+$type = $4;
+
+if ($type =~ /^[ab]$/)
+{
+ $version =~ /InspIRCd-\d+\.\d+\.\d+[ab\+](\d+)/;
+ $alphabeta = $1;
+ $name = "InspIRCd-$v1.$v2.$v3$type$alphabeta.exe";
+ $rel = "$v1.$v2.$v3$type$alphabeta";
+}
+else
+{
+ $name = "InspIRCd-$v1.$v2.$v3.exe";
+ $rel = "$v1.$v2.$v3";
+}
+
+print "del $name\n";
+print "ren Setup.exe $name\n";
+system("del $name");
+system("ren Setup.exe $name");
+
+system("upload_release.bat $name $rel");
|