Skip to content

Commit

Permalink
fix: use end marker
Browse files Browse the repository at this point in the history
  • Loading branch information
aeimer committed Jul 28, 2024
1 parent b0888a2 commit 8dddc6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update-toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ echo "----"

for file in ${INPUT_REPLACE_IN//,/ }; do
# https://stackoverflow.com/questions/2699666/replace-delimited-block-of-text-in-file-with-the-contents-of-another-file
sed -i -ne '/'"$INPUT_REPLACE_MARKER_START"'/ {p; r '<(cat <<<"$toc") -e ':a; n; /'"$INPUT_REPLACE_MARKER_START"'/ {p; b}; ba}; p' "$file"
sed -i -ne '/'"$INPUT_REPLACE_MARKER_START"'/ {p; r '<(cat <<<"$toc") -e ':a; n; /'"$INPUT_REPLACE_MARKER_END"'/ {p; b}; ba}; p' "$file"
done

0 comments on commit 8dddc6f

Please sign in to comment.