Skip to content

Commit

Permalink
Only keep one Interface line in the packaged TOC file
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Mar 28, 2021
1 parent 5e59fc3 commit 4ffa86a
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1341,11 +1341,16 @@ toc_filter2() {
}

toc_interface_filter() {
if [ -n "$root_toc_version" ]; then # rewrite
sed 's/^## Interface:.*$/## Interface: '"$toc_version"'/'
else # add
sed '1i\
## Interface: '"$toc_version"
if [ "$root_toc_version" != "$toc_version" ]; then
# toc version isn't what is set in the toc file
if [ -n "$root_toc_version" ]; then # rewrite
sed -e 's/^## Interface:.*$/## Interface: '"$toc_version"'/' -e '/^## Interface-/d'
else # add
sed -e '1i\
## Interface: '"$toc_version" -e '/^## Interface-/d'
fi
else
sed -e '/^## Interface-/d'
fi
}

Expand Down Expand Up @@ -1548,7 +1553,7 @@ copy_directory_tree() {
_cdt_filters+="|toc_filter2 no-lib-strip ${_cdt_nolib:-0}"
_cdt_filters+="|toc_filter2 do-not-package ${_cdt_do_not_package:-0}"
_cdt_filters+="|toc_filter2 retail ${_cdt_classic:-0}"
[ "$root_toc_version" != "$toc_version" ] && _cdt_filters+="|toc_interface_filter"
_cdt_filters+="|toc_interface_filter"
[ -n "$_cdt_localization" ] && _cdt_filters+="|localization_filter"
;;
esac
Expand Down

0 comments on commit 4ffa86a

Please sign in to comment.