This commit is contained in:
Nikita Ivanov 2022-07-15 00:00:52 +05:00
parent 5ef3f4ff48
commit f2e4ad4482
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
5 changed files with 9 additions and 4 deletions

View File

@ -39,8 +39,8 @@ clean:
$(MAKE) -C embed clean
docs: README.md doc/ctpv.1
./deplist.awk $(PRE) | ./deplist.md.sh | ./deplistadd.sh README.md
./deplist.awk $(PRE) | ./deplist.1.sh | ./deplistadd.sh doc/ctpv.1
deptable/list.awk $(PRE) | deptable/markdown.sh | deptable/insert.sh README.md
deptable/list.awk $(PRE) | deptable/roff.sh | deptable/insert.sh doc/ctpv.1
ctpv: $(OBJ)
$(CC) -o $@ $+ $(LDFLAGS)

View File

@ -1,11 +1,14 @@
#!/bin/sh
set -e
tmp="$(mktemp XXXXXX)"
table="$(mktemp XXXXXX)"
trap 'rm "$table"' EXIT
cat > "$table"
sed -i "
sed "
/TABLESTART/,/TABLEEND/ {
/TABLESTART/ {
r $table
@ -13,4 +16,6 @@ sed -i "
}
/TABLEEND/!d
}
" "$1"
" "$1" > "$tmp"
mv -- "$tmp" "$1"