|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
0211a4 |
# help.sh -- This function provides documentation features to
|
|
|
4c79b5 |
# centos-art.sh script. Here we initialize documentation variables and
|
|
|
0211a4 |
# call help_getArguments functions.
|
|
|
4c79b5 |
#
|
|
|
9f5f2e |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
4c79b5 |
#
|
|
|
7cd8e9 |
# This program is free software; you can redistribute it and/or
|
|
|
7cd8e9 |
|
|
|
7cd8e9 |
|
|
|
7cd8e9 |
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# General Public License for more details.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# along with this program; if not, write to the Free Software
|
|
|
4c79b5 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
4c79b5 |
# USA.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
418249 |
# $Id$
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
4c79b5 |
|
|
|
0211a4 |
function help {
|
|
|
2bd980 |
|
|
|
c145a8 |
local ACTIONNAM=''
|
|
|
c145a8 |
local ACTIONVAL=''
|
|
|
c145a8 |
|
|
|
5285d6 |
|
|
|
5285d6 |
|
|
|
5285d6 |
|
|
|
8bcc5c |
MANUAL_BASEDIR="${HOME}/artwork/trunk/Identity/Manual"
|
|
|
5285d6 |
|
|
|
1f6dd8 |
|
|
|
1f6dd8 |
|
|
|
69150d |
MANUAL_NAME=repository
|
|
|
1f6dd8 |
|
|
|
1f6dd8 |
|
|
|
1f6dd8 |
|
|
|
1f6dd8 |
# related files (.info, .pdf, .xml, etc.).
|
|
|
1f6dd8 |
MANUAL_BASEFILE="${MANUAL_BASEDIR}/${MANUAL_NAME}"
|
|
|
1f6dd8 |
|
|
|
c145a8 |
# Interpret arguments and options passed through command-line.
|
|
|
0211a4 |
help_getArguments
|
|
|
c145a8 |
|
|
|
c145a8 |
# Redefine positional parameters using ARGUMENTS. At this point,
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
eval set -- "$ARGUMENTS"
|
|
|
c145a8 |
|
|
|
6cda26 |
|
|
|
6cda26 |
|
|
|
6cda26 |
|
|
|
0211a4 |
|
|
|
6cda26 |
|
|
|
6cda26 |
|
|
|
6cda26 |
|
|
|
6cda26 |
|
|
|
c145a8 |
for ACTIONVAL in "$@";do
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
cli_checkRepoDirSource
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
0211a4 |
ENTRY=$(help_getEntry)
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
ENTRY_DIR=$(dirname ${ENTRY} | sed -r 's!\.texi$!!')
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
ENTRY_FILE=$(basename ${ENTRY} | sed -r 's!\.texi$!!')
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
MANUAL_CHAPTER_DIR=$(echo $ENTRY | cut -d / -f-7)
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
MANUAL_CHAPTER_NAME=$(basename "$MANUAL_CHAPTER_DIR")
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
cli_printActionPreamble "${MANUAL_BASEFILE}.texi" '' ''
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
cli_syncroRepoChanges ${MANUAL_BASEDIR}
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
if [[ $ACTIONNAM =~ "^${FUNCNAM}_[A-Za-z]+$" ]];then
|
|
|
c145a8 |
eval $ACTIONNAM
|
|
|
c145a8 |
else
|
|
|
c145a8 |
cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine'
|
|
|
eee226 |
cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine'
|
|
|
c145a8 |
fi
|
|
|
638bf8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
|
|
|
c145a8 |
cli_commitRepoChanges ${MANUAL_BASEDIR}
|
|
|
4c79b5 |
|
|
|
c145a8 |
done
|
|
|
4c79b5 |
}
|