From 1d8e13818465878008741d5e8c71c05860ed0dfa Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 01 2013 19:17:12 +0000 Subject: Update web environment. - Add script files describing how to customize mailman-2.1.9-6. --- diff --git a/Artworks/Webenv/Mailman/2.1.9-6.el5/cleanup.sed b/Artworks/Webenv/Mailman/2.1.9-6.el5/cleanup.sed new file mode 100644 index 0000000..ebcb452 --- /dev/null +++ b/Artworks/Webenv/Mailman/2.1.9-6.el5/cleanup.sed @@ -0,0 +1,52 @@ +#!/bin/sed + +# Convert HTML tags from upper case to lowercase. +s!<([[:alnum:]]+)!<\L\1!g +s!([[:alnum:]]+)>!\L\1>!g +s!)/\1\n/g +/<\/title>/a\ + \ + + +# Add CentOS tags. +s/(\ +\ +
+ +# These Mailman comments must appear one per line. +s/()/\n\1\n/ +s/()/\n\1\n/ + +# Cloase CentOS tags. +s/(<\/body>)/\n\1\n/g +/<\/body>/i\ +
\ +\ +\ diff --git a/Artworks/Webenv/Mailman/2.1.9-6.el5/cleanup.sh b/Artworks/Webenv/Mailman/2.1.9-6.el5/cleanup.sh new file mode 100755 index 0000000..9e37105 --- /dev/null +++ b/Artworks/Webenv/Mailman/2.1.9-6.el5/cleanup.sh @@ -0,0 +1,33 @@ +#!/bin/bash +###################################################################### +# +# cleanup.sh -- This script creates copies of Mailman's template +# files cleans them up using xmllint, sed and tidy programs. +# Mailman's template files control only one part of Mailman's +# presentation. The rest is inside the source code (e.g., look at +# htmlformat.py at HTMLFORMAT.py). This script takes care of the +# first face of the customization only. +# +# USAGE +# ./CustomizationTools/cleanup.sh FILE.html ... +# +# Copyright (C) 2013 The CentOS Artwork SIG +# +# 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 2 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, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +######################################################################## + +echo "Customizing files ..." +sed -i -r -f CustomizationTools/cleanup-all.sed $(find templates -name '*.html') diff --git a/Artworks/Webenv/Mailman/2.1.9-6.el5/install.sh b/Artworks/Webenv/Mailman/2.1.9-6.el5/install.sh new file mode 100755 index 0000000..bbe89a7 --- /dev/null +++ b/Artworks/Webenv/Mailman/2.1.9-6.el5/install.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +function install_template { + local MAILMAN=/usr/lib/mailman + local MAILMAN_THEMES_BASEDIR=themes/centos + local SOURCE=${1} + local TARGET=${MAILMAN}/${MAILMAN_THEMES_BASEDIR}/$(echo ${SOURCE} | sed 's/\.new//') + sudo cp ${SOURCE} ${TARGET} + echo "${SOURCE} installed at ${TARGET}" +}