From 9de177db4cc612ba540efcadc6a44aac0239268e Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Mar 23 2011 19:35:46 +0000 Subject: Update cli_printMessage.sh: - Stop using $(caller) built-in function to build the documentation entry. Instead, start using the FUNCDIRNAM variable to retrive the function directory name of the functionality the AsToKnowMoreLine was triggered. - Update the centos-art.sh help command-line interface to the following form: centos-art help path/to/dir The --read option is the default action used when no option is passed to centos-art.sh help functionality. The form shown above describes pretty well what we are doing. --- diff --git a/Scripts/Functions/cli_printMessage.sh b/Scripts/Functions/cli_printMessage.sh index 4be1f8d..74b6b91 100755 --- a/Scripts/Functions/cli_printMessage.sh +++ b/Scripts/Functions/cli_printMessage.sh @@ -110,10 +110,10 @@ function cli_printMessage { 'AsToKnowMoreLine' ) # This option receives the output of bash's caller built-in as # message value and produces the documentation entry from it. - MESSAGE=$(dirname "$(echo $MESSAGE | cut -d ' ' -f2-)") + MESSAGE="trunk/Scripts/Functions/$MESSAGE" cli_printMessage '-' 'AsSeparatorLine' cli_printMessage "`gettext "To know more, run the following command"`:" - cli_printMessage "centos-art manual --read='$MESSAGE'" + cli_printMessage "centos-art help $MESSAGE" cli_printMessage '-' 'AsSeparatorLine' exit # <-- ATTENTION: Do not remove this line. We use this # option as convenction to end script