| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function texinfo_deleteCrossReferences { |
| |
| 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]="@(pxref|xref|ref)\{(${NODE})\}" |
| PATTERN[1]="^(\* ${NODE}:(.*)?:(.*)?)$" |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| REPLACE[0]='--- @strong{'`gettext "Removed"`'}(\1:\2) ---' |
| REPLACE[1]='@comment --- '`gettext "Removed"`'(\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} |
| |
| } |