Blame Scripts/Functions/Help/help_getChapterDir.sh

d8f0b6
#!/bin/bash
d8f0b6
#
f5d113
# help_getChapterDir.sh -- This function outputs the entry's
d8f0b6
# chapter directory.
d8f0b6
#
3b0984
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
d8f0b6
#
d8f0b6
# This program is free software; you can redistribute it and/or modify
d8f0b6
# it under the terms of the GNU General Public License as published by
d8f0b6
# the Free Software Foundation; either version 2 of the License, or (at
d8f0b6
# your option) any later version.
d8f0b6
#
d8f0b6
# This program is distributed in the hope that it will be useful, but
d8f0b6
# WITHOUT ANY WARRANTY; without even the implied warranty of
d8f0b6
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
d8f0b6
# General Public License for more details.
d8f0b6
#
d8f0b6
# You should have received a copy of the GNU General Public License
d8f0b6
# along with this program; if not, write to the Free Software
d8f0b6
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
d8f0b6
#
d8f0b6
# ----------------------------------------------------------------------
d8f0b6
# $Id$
d8f0b6
# ----------------------------------------------------------------------
d8f0b6
f5d113
function help_getChapterDir {
d8f0b6
ef58cd
    local MANUAL_ENTRY=''
ef58cd
    local MANUAL_ENTRIES="$1"
d8f0b6
d8f0b6
    # At this point, we need to take a desition about documentation
d8f0b6
    # design, in order to answer the question: How do we assign
d8f0b6
    # chapters, sections and subsections automatically, based on the
d8f0b6
    # repository structure?  and also, how such design could be
d8f0b6
    # adapted to changes in the repository structure?
d8f0b6
    #
d8f0b6
    # One solution would be: represent the repository's directory
d8f0b6
    # structure as sections inside a chapter named `Directories' or
d8f0b6
    # something similar. Subsections and subsubsections will not have
d8f0b6
    # their own files, they all will be written inside the same
d8f0b6
    # section file that represents the repository documentation entry.
ef58cd
    for MANUAL_ENTRY in $MANUAL_ENTRIES;do
9fa13b
        ${FUNCNAM}_getEntry $MANUAL_ENTRY | cut -d / -f-8
b45dde
    done | sort | uniq
d8f0b6
d8f0b6
}