From b0aebb7a1d44224e31ce9c00b9dab088500301a9 Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Wed, 9 Oct 2002 11:25:16 +0000 Subject: [PATCH] script that loads predefined uwobo stylesheets --- .../init.d/loadPredefinedStylesheets.pl | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100755 helm/scripts/init.d/loadPredefinedStylesheets.pl diff --git a/helm/scripts/init.d/loadPredefinedStylesheets.pl b/helm/scripts/init.d/loadPredefinedStylesheets.pl new file mode 100755 index 000000000..387a6fc2c --- /dev/null +++ b/helm/scripts/init.d/loadPredefinedStylesheets.pl @@ -0,0 +1,67 @@ +#!/usr/bin/perl -w +use strict; + +my $confile = $ENV{"UWOBO_PANEL_CONF"} || die "UWOBO_PANEL_CONF not defined"; + +use LWP::UserAgent; +use URI::Escape; + +sub getPredefinedStylesheets () { + my %stylesconf; + my $inForm = 0; # currenlty inside 'predefinedStylesheets' form + open(CONF, "< $confile") || die "Can't open $confile"; + while(my $l = ) { + chomp($l); + if (not $inForm) { + if ($l =~ /
/) { + $inForm = 1; + } + } else { # in form + if ($l =~ /<\/form>/) { + $inForm = 0; + } elsif ($l =~ /