mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-24 06:24:19 +02:00
Add man page consistency check.
This commit is contained in:
parent
6692c21311
commit
d335bf8f97
2 changed files with 39 additions and 1 deletions
37
test/man-pages
Normal file
37
test/man-pages
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2024, project-repo and the cagebreak contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
RESULT=0
|
||||
|
||||
cd "${MESONCURRENTCONFIGDIR}" || exit 1
|
||||
|
||||
tail_license=$(tail -n 17 LICENSE)
|
||||
tail_man1=$(tail -n 17 man/cagebreak.1.md)
|
||||
tail_man5=$(tail -n 17 man/cagebreak-config.5.md)
|
||||
tail_man7=$(tail -n 17 man/cagebreak-socket.7.md)
|
||||
|
||||
[[ $tail_license = "$tail_man1" ]] || RESULT=1
|
||||
[[ $tail_license = "$tail_man5" ]] || RESULT=1
|
||||
[[ $tail_license = "$tail_man7" ]] || RESULT=1
|
||||
|
||||
if [[ $RESULT -eq 0 ]]
|
||||
then
|
||||
echo "[x] License ending"
|
||||
else
|
||||
echo "[ ] License ending"
|
||||
fi
|
||||
|
||||
for man_page in man/*
|
||||
do
|
||||
grep -q "$man_page" manuals.md || RESULT=1
|
||||
done
|
||||
|
||||
if [[ $RESULT -eq 0 ]]
|
||||
then
|
||||
echo "[x] All man pages listed in manuals.md"
|
||||
else
|
||||
echo "[ ] All man pages listed in manuals.md"
|
||||
fi
|
||||
|
||||
exit "${RESULT}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue