X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fssic.pl;h=598468c4dd616bcf082c77f7d3c1c96ee4d40450;hb=a99b19ff50d889d9a1b4a06b31a41ed7c354eaec;hp=553f83d00162787b840086237886d91e2df5ff4b;hpb=87ad3d52c3d06311e0fdd87dc654408ee746c45c;p=ssic.git
diff --git a/src/ssic.pl b/src/ssic.pl
old mode 100644
new mode 100755
index 553f83d..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;
@@ -19,6 +34,7 @@ sub main
if (not GetOptions(\%opts,
"o=s",
"D=s%",
+ "I=s",
"h|help",
"V|version",
)) {
@@ -42,12 +58,12 @@ sub main
if ($#ARGV gt 0) {
error(4, "Cannot specify -o with multiple files\n");
}
- compile($ARGV[0], $opts{'o'}, $opts{'D'});
+ compile($ARGV[0], $opts{'o'}, $opts{'D'}, $opts{'I'});
} else {
for $input (@ARGV) {
$output = $input;
$output =~ s/\.[^.]+$/.html/;
- compile($input, $output, $opts{'D'});
+ compile($input, $output, $opts{'D'}, $opts{'I'});
}
}
}
@@ -66,6 +82,7 @@ sub help
usage($fh);
print("Options:\n");
print(" -D = Set the variable to \n");
+ print(" -I Set the document root to \n");
print(" -o