From 6155daba5b0e4f8d3baad696a446a521962686e0 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 20 2011 21:36:08 +0000 Subject: Update `Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh'. --- diff --git a/Scripts/Bash/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh b/Scripts/Bash/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh index 64983c8..806a328 100755 --- a/Scripts/Bash/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh +++ b/Scripts/Bash/Functions/Help/Texinfo/texinfo_deleteEntryChapter.sh @@ -32,6 +32,15 @@ function texinfo_deleteEntryChapter { # cannot delete an entry which doesn't exist. cli_checkFiles "$MANUAL_CHAPTER_DIR" + # Define list of chapters that shouldn't be removed. + local SPECIAL_CHAPTERS='/(Licenses|Index)$' + + # Verify list of chapters that shouldn't be removed against the + # current chapter directory being removed. + if [[ $MANUAL_CHAPTER_DIR =~ $SPECIAL_CHAPTERS ]];then + cli_printMessage "`gettext "The chapter specified cannot be removed."`" --as-error-line + fi + # Build list of section entries inside the chapter. This is # required to delete cross references from other section entries # that point to section entries inside the chapter that will be @@ -63,4 +72,3 @@ function texinfo_deleteEntryChapter { done } -