| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function document_restoreCrossReferences { |
| |
| local -a PATTERN |
| local -a REPLACE |
| local LOCATION='' |
| |
| |
| |
| |
| if [[ "$1" != '' ]];then |
| LOCATION="$1" |
| else |
| LOCATION="$ENTRY" |
| fi |
| |
| |
| local NODE=$(echo "$LOCATION" \ |
| | cut -d / -f8- \ |
| | tr '/' ' ' \ |
| | sed -r \ |
| -e "s/(chapter-intro\.texi|\.texi)$//" \ |
| -e 's! !( |\\n)!g') |
| |
| |
| |
| PATTERN[0]="--- @strong\{`gettext "Removed"`\}\((pxref|xref|ref):(${NODE})\) ---" |
| PATTERN[1]="^@comment --- `gettext "Removed"`\((\* ${NODE}:(.*)?:(.*)?)\) ---$" |
| |
| |
| |
| REPLACE[0]='@\1{\2}' |
| REPLACE[1]='\1' |
| |
| |
| local ENTRIES=$(cli_getFilesList "${MANUAL_BASEDIR}" '.*\.texi') |
| |
| |
| cli_printActionPreamble "$ENTRIES" '' '' |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| sed -r -i ":a;N;s!${PATTERN[0]}!${REPLACE[0]}!g;ba" ${ENTRIES} |
| |
| |
| |
| |
| sed -r -i "s!${PATTERN[1]}!${REPLACE[1]}!" ${ENTRIES} |
| |
| } |