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.