X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fssic.pl;h=598468c4dd616bcf082c77f7d3c1c96ee4d40450;hb=a99b19ff50d889d9a1b4a06b31a41ed7c354eaec;hp=cad68517be2fe7b93d81f69929f8ed4f9c74be91;hpb=37fc33abf5130de76800e3cba2fb60cf74c5c239;p=ssic.git
diff --git a/src/ssic.pl b/src/ssic.pl
old mode 100644
new mode 100755
index cad6851..598468c
--- a/src/ssic.pl
+++ b/src/ssic.pl
@@ -1,4 +1,19 @@
#!/usr/bin/perl
+#
+# Copyright (C) 2013 Patrick "P. J." McDermott
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
use strict;
use warnings;
@@ -18,10 +33,13 @@ sub main
"no_getopt_compat");
if (not GetOptions(\%opts,
"o=s",
+ "D=s%",
+ "I=s",
"h|help",
"V|version",
)) {
usage(*STDERR);
+ exit(4);
}
if (exists($opts{'h'})) {
@@ -40,12 +58,12 @@ sub main
if ($#ARGV gt 0) {
error(4, "Cannot specify -o with multiple files\n");
}
- compile($ARGV[0], $opts{'o'});
+ compile($ARGV[0], $opts{'o'}, $opts{'D'}, $opts{'I'});
} else {
for $input (@ARGV) {
$output = $input;
$output =~ s/\.[^.]+$/.html/;
- compile($input, $output);
+ compile($input, $output, $opts{'D'}, $opts{'I'});
}
}
}
@@ -63,9 +81,11 @@ sub help
usage($fh);
print("Options:\n");
- print(" -o