| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function help_removeEntry { |
| |
| |
| local ENTRIES='' |
| local ENTRIES_COUNTER=0 |
| local LOCATION='' |
| |
| |
| if [[ ! -f $ENTRY ]];then |
| cli_printMessage "`gettext "The following entry doesn't exist:"`" |
| cli_printMessage "$ENTRY" "AsResponseLine" |
| cli_printMessage "trunk/Scripts/Bash/Functions/Help --filter='help_removeEntry.sh" "AsToKnowMoreLine" |
| fi |
| |
| # Define entries. Start with the one being processed currently. |
| ENTRIES=$ENTRY |
| |
| # Define root location to look for entries. |
| LOCATION=$(echo $ENTRY | sed -r 's!\.texi$!!') |
| |
| # Re-define location to match the chapter's root directory. This |
| # applies when you try to remove the whole chapter from the |
| # working copy (e.g., centos-art help --remove=/home/centos/artwork/trunk/). |
| if [[ $ENTRY =~ "${MANUALS_FILE[7]}$" ]];then |
| LOCATION=$(dirname $ENTRY) |
| fi |
| |
| |
| |
| |
| |
| |
| |
| if [[ -d $LOCATION ]];then |
| for ENTRY in $(find $LOCATION -name '*.texi');do |
| ENTRIES="$ENTRIES $ENTRY $(dirname $ENTRY)" |
| ENTRIES_COUNTER=$(($ENTRIES_COUNTER + 1)) |
| done |
| fi |
| |
| |
| ENTRIES=$(echo "$ENTRIES" | tr ' ' "\n" | sort -r | uniq) |
| |
| |
| cli_printMessage "`ngettext "The following entry will be removed:" \ |
| "The following entries will be removed:" \ |
| $ENTRIES_COUNTER`" |
| |
| |
| for ENTRY in $ENTRIES;do |
| cli_printMessage "$ENTRY" "AsResponseLine" |
| done |
| |
| cli_printMessage "`gettext "Do you want to continue?"`" "AsYesOrNoRequestLine" |
| |
| |
| for ENTRY in $ENTRIES;do |
| |
| |
| cli_printMessage "$ENTRY" "AsRemovingLine" |
| |
| |
| |
| eval svn del $ENTRY --force --quiet |
| |
| done |
| |
| |
| |
| if [[ -d $ENTRYCHAPTER ]];then |
| |
| |
| |
| help_updateMenu "remove-entry" |
| help_updateNodes |
| else |
| |
| |
| |
| help_updateChaptersMenu 'remove-entry' |
| help_updateChaptersNodes |
| fi |
| |
| |
| help_updateOutputFiles |
| |
| } |