| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function texinfo_restoreCrossReferences { |
| |
| local -a PATTERN |
| local -a REPLACE |
| |
| |
| local MANUAL_ENTRY="$1" |
| |
| |
| |
| if [[ $MANUAL_ENTRY == '' ]];then |
| cli_printMessage "`gettext "The first positional parameter cannot be empty."`" --as-error-line |
| fi |
| |
| |
| local NODE=$(${FLAG_BACKEND}_getNode "$MANUAL_ENTRY") |
| |
| |
| |
| PATTERN[0]="--- @strong\{`gettext "Removed"`\}\((pxref|xref|ref):(${NODE})\) ---" |
| PATTERN[1]="^@comment --- `gettext "Removed"`\((\* ${NODE}:(.*)?:(.*)?)\) ---$" |
| |
| |
| |
| REPLACE[0]='@\1{\2}' |
| REPLACE[1]='\1' |
| |
| |
| local MANUAL_ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} --pattern=".*\.${FLAG_BACKEND}") |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| sed -r -i ":a;N;s!\<${PATTERN[0]}\>!${REPLACE[0]}!g;ba" ${MANUAL_ENTRIES} |
| |
| |
| |
| |
| sed -r -i "s!\<${PATTERN[1]}\>!${REPLACE[1]}!" ${MANUAL_ENTRIES} |
| |
| } |