aboutsummaryrefslogtreecommitdiff
path: root/install-win32/nsitran.pl
diff options
context:
space:
mode:
Diffstat (limited to 'install-win32/nsitran.pl')
-rw-r--r--install-win32/nsitran.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/install-win32/nsitran.pl b/install-win32/nsitran.pl
new file mode 100644
index 0000000..7c04e40
--- /dev/null
+++ b/install-win32/nsitran.pl
@@ -0,0 +1,16 @@
+($mode) = @ARGV;
+
+while (<STDIN>) {
+ chomp;
+ if (/^\s*$/) {
+ print "\n";
+ } elsif (/^[#;](.*)$/) {
+ print "//$1\n" if ($mode eq "c");
+ print "#$1\n" if ($mode eq "sh");
+ print "//$1\n" if ($mode eq "js");
+ } elsif (/^!define\s+(\w+)\s+(.+)$/) {
+ print "#define $1 $2\n" if ($mode eq "c");
+ print "export $1=$2\n" if ($mode eq "sh");
+ print "var $1=$2;\n" if ($mode eq "js");
+ }
+}