From 84cc95f424d729b91ca291135b9411f6204a615a Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: May 31 2013 03:19:01 +0000 Subject: Update centos-art.sh script - Scripts/Bash/Functions/Help/Texinfo/texinfo_updateLicenseLink.sh: Remove license files from manual's specific models. These files must be symbolic links. Otherwise, the directory structure is considered old and a new version must be fetched from central repositories. - Scripts/Bash/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh: Move script execution to manuals base directory in order for makeinfo to produce content correctly. --- diff --git a/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateLicenseLink.sh b/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateLicenseLink.sh index 7c8dbe2..273e6b0 100755 --- a/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateLicenseLink.sh +++ b/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateLicenseLink.sh @@ -40,9 +40,16 @@ function texinfo_updateLicenseLink { # Remove path from license templates. FILE=$(basename ${FILE}) - # Remove license files from manual's specific models. - if [[ -e ${MANUAL_BASEDIR_L10N}/${FILE} ]];then - rm -r ${MANUAL_BASEDIR_L10N}/${FILE} + # Remove license files from manual's specific models. All + # these files are symbolic links. If they aren't, stop the + # script execution with an error message. In this case you + # need to fix your directory structure first (e.g., by + # fetching a more up-to-date version of it from central + # repository). + if [[ -h ${MANUAL_BASEDIR_L10N}/${FILE} ]];then + rm ${MANUAL_BASEDIR_L10N}/${FILE} + else + cli_printMessage "${MANUAL_BASEDIR_L10N} `gettext "has an old directory structure."`" --as-error-line fi # Create link from manual's default models to manual's diff --git a/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh b/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh index bee6979..ed1eedc 100755 --- a/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh +++ b/Scripts/Bash/Functions/Help/Texinfo/texinfo_updateOutputFiles.sh @@ -37,9 +37,11 @@ function texinfo_updateOutputFiles { mkdir -p $(dirname $MANUAL_OUTPUT_BASEFILE) fi - # Add the working copy root directory to directory stack to make - # path construction correctly. Otherwise, makeinfo may produce - # paths incorrectly. + # Move script execution to manuals base directory in order for + # makeinfo to produce content correctly. This is the location + # where the documentation's main definition file is stored in. + # Related content outside this location is accessible through + # symbolic links. pushd ${MANUAL_BASEDIR_L10N} > /dev/null # Verify existence of link to Licenses information.