From e50522f0be2410eeee54f2e7f5841b9724111d10 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jun 11 2011 02:45:17 +0000 Subject: Rename `xhtml_toc.awk' to `toc.awk'. --- diff --git a/Scripts/Functions/Tuneup/Backends/Xhtml/Config/toc.awk b/Scripts/Functions/Tuneup/Backends/Xhtml/Config/toc.awk new file mode 100644 index 0000000..28b38e4 --- /dev/null +++ b/Scripts/Functions/Tuneup/Backends/Xhtml/Config/toc.awk @@ -0,0 +1,79 @@ +#!/usr/bin/gawk +# +# toc.awk -- This file provides the output format required by +# `xhtml_makeToc' function, inside centos-art.sh script, to produce +# the table of contents correctly. +# +# Copyright (C) 2009-2010 Alain Reguera Delgado +# +# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +# USA. +# +# ---------------------------------------------------------------------- +# $Id$ +# ---------------------------------------------------------------------- + +BEGIN {FS=":"} + +{ + if ($1 == 0 && $2 == $3) { + opentags = "" + } + } + + if ($1 > 0 && $2 >= $3 && $3 == 1) { + print "" + print "" + } + + if ($1 > 0 && $2 < $3) { + for (i = 1; i <= $2; i++) { + print "" + } + } + + print "" +} diff --git a/Scripts/Functions/Tuneup/Backends/Xhtml/Config/xhtml_toc.awk b/Scripts/Functions/Tuneup/Backends/Xhtml/Config/xhtml_toc.awk deleted file mode 100644 index 3e82492..0000000 --- a/Scripts/Functions/Tuneup/Backends/Xhtml/Config/xhtml_toc.awk +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/gawk -# -# xhtml_toc.awk -- This file provides the output format required by -# xhtml_makeToc function, inside centos-art.sh script, to produce the -# table of contents correctly. -# -# Copyright (C) 2009-2010 Alain Reguera Delgado -# -# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -BEGIN {FS=":"} - -{ - if ($1 == 0 && $2 == $3) { - opentags = "" - } - } - - if ($1 > 0 && $2 >= $3 && $3 == 1) { - print "" - print "" - } - - if ($1 > 0 && $2 < $3) { - for (i = 1; i <= $2; i++) { - print "" - } - } - - print "" -} diff --git a/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh b/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh index 658f494..2374cd8 100644 --- a/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh +++ b/Scripts/Functions/Tuneup/Backends/Xhtml/xhtml_doToc.sh @@ -57,7 +57,7 @@ function xhtml_doToc { # Define table of content configuration file, the file used to # produce the table of content XHTML output code. - local TOC_CONFIG=${TUNEUP_BACKEND_CONFIG}/$(cli_getRepoName ${TUNEUP_BACKEND} -f)_toc.awk + local TOC_CONFIG=${TUNEUP_BACKEND_CONFIG}/toc.awk # Verify table of content configuration file. cli_checkFiles ${TOC_CONFIG}