| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function manual_deleteEntry { |
| |
| |
| local ENTRIES='' |
| local LOCATION='' |
| |
| |
| cli_checkFiles $ENTRY 'f' |
| |
| |
| ENTRIES=$ENTRY |
| |
| |
| LOCATION=$(echo $ENTRY | sed -r 's!\.texi$!!') |
| |
| |
| |
| |
| 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")" |
| done |
| fi |
| |
| |
| ENTRIES=$(echo "$ENTRIES" | tr ' ' "\n" | sort -r | uniq) |
| |
| |
| cli_printActionPreamble "$ENTRIES" 'doDelete' 'AsResponseLine' |
| |
| |
| for ENTRY in $ENTRIES;do |
| |
| |
| if [[ $(cli_getRepoStatus "$ENTRY") =~ '^(\?)?$' ]];then |
| |
| |
| cli_printMessage "$ENTRY" "AsDeletingLine" |
| |
| else |
| |
| |
| |
| |
| cli_printMessage "`gettext "There are changes that need to be committed first."`" 'AsErrorLine' |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| |
| fi |
| |
| |
| |
| |
| |
| if [[ "$(cli_getRepoStatus "$ENTRY")" == '' ]];then |
| |
| |
| |
| |
| svn del "$ENTRY" --quiet |
| |
| elif [[ "$(cli_getRepoStatus "$ENTRY")" == '?' ]];then |
| |
| |
| |
| |
| |
| |
| rm -r "$ENTRY" |
| |
| fi |
| |
| |
| |
| manual_updateMenu "remove-entry" |
| manual_updateNodes |
| |
| |
| manual_deleteCrossReferences |
| |
| done |
| |
| |
| |
| |
| if [[ ! -d $ENTRYCHAPTER ]];then |
| manual_updateChaptersMenu 'remove-entry' |
| manual_updateChaptersNodes |
| fi |
| |
| } |