mirror of
https://github.com/ben-grande/qusal.git
synced 2025-05-06 08:15:32 -04:00
test
This commit is contained in:
parent
64ed44d4d5
commit
9d3111f1fa
562 changed files with 4944 additions and 1211 deletions
15
scripts/update-toc.sh
Executable file
15
scripts/update-toc.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
## SPDX-FileCopyrightText: 2023 Qusal contributors
|
||||
##
|
||||
## SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
## Requires: https://github.com/mzlogin/vim-markdown-toc
|
||||
set -eu
|
||||
|
||||
for f in "$@"; do
|
||||
if ! grep -q "^## Table of Contents$" "$f"; then
|
||||
echo "Could not find table of contents on file: $f" >&2; exit 1
|
||||
fi
|
||||
vim -c 'norm zRgg' -c '/^## Table of Contents$' -c 'norm jd}k' -c ':GenTocGFM' -c 'norm ddgg' -c wq -- "${f}"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue