echo -n "Loading UWOBO stylesheets (mowgli) ... "
$UWOBO_INIT_SCRIPT > /dev/null
echo "done!"
+ echo -n "Loading UWOBO stylesheets (mowgli NuPRL) ... "
+ $UWOBO_INIT_SCRIPT $NUPRL_UWOBO_PANEL_CONF > /dev/null
+ echo "done!"
;;
stop)
$UWOBO_INIT_SCRIPT --unload > /dev/null
+ $UWOBO_INIT_SCRIPT --unload $NUPRL_UWOBO_PANEL_CONF > /dev/null
;;
reload)
$UWOBO_INIT_SCRIPT --reload > /dev/null
+ $UWOBO_INIT_SCRIPT --reload $NUPRL_UWOBO_PANEL_CONF > /dev/null
;;
restart)
$UWOBO_INIT_SCRIPT --unload > /dev/null
+ $UWOBO_INIT_SCRIPT --unload $NUPRL_UWOBO_PANEL_CONF > /dev/null
$UWOBO_INIT_SCRIPT > /dev/null
+ $UWOBO_INIT_SCRIPT $NUPRL_UWOBO_PANEL_CONF > /dev/null
;;
*)
use URI::Escape;
my $usage = <<EOHELP;
-loadPredefinedStylesheets.pl
-loadPredefinedStylesheets.pl { -u | --unload }
-loadPredefinedStylesheets.pl { -r | --reload }
-loadPredefinedStylesheets.pl { -h | --help }
+loadPredefinedStylesheets.pl [ uwobo_panel_conf_file ]
+loadPredefinedStylesheets.pl { -u | --unload } [ uwobo_panel_conf_file ]
+loadPredefinedStylesheets.pl { -r | --reload } [ uwobo_panel_conf_file ]
+loadPredefinedStylesheets.pl { -h | --help } [ uwobo_panel_conf_file ]
+
+If uwobo_panel_conf_file is provided, it's used as HTML file from which
+parse XSLT stylesheets, otherwise UWOBO_PANEL_CONF environment variable
+is used.
EOHELP
sub getPredefinedStylesheets ($) {
my $action = "load";
my $opt = shift || "";
-die $usage if (($opt eq "-h") or ($opt eq "--helm"));
-$action = "unload" if (($opt eq "-u") or ($opt eq "--unload"));
-$action = "reload" if (($opt eq "-r") or ($opt eq "--reload"));
-
-my $confile = $ENV{"UWOBO_PANEL_CONF"} || die "UWOBO_PANEL_CONF not defined";
+die $usage if (($opt eq "-h") or ($opt eq "--help"));
+if (($opt eq "-u") or ($opt eq "--unload")) {
+ $action = "unload";
+} elsif (($opt eq "-r") or ($opt eq "--reload")) {
+ $action = "reload";
+} else {
+ unshift (@ARGV, $opt);
+}
+my $confile =
+ shift || $ENV{"UWOBO_PANEL_CONF"} || die "UWOBO_PANEL_CONF not defined";
my $getter_url = $ENV{"HELM_GETTER_URL"} || die "HELM_GETTER_URL not defined";
my $uwobo_url = $ENV{"HELM_UWOBO_URL"} || die "HELM_UWOBO_URL not defined";
my %styles = getPredefinedStylesheets($confile);