summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/ci/validate-man.sh
blob: 92df4978143cd2e00049ee9874b3ef9e30750cc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# This script validates that there aren't any changes to the man pages.

set -e

cd src/doc

changes=$(git status --porcelain)
if [ -n "$changes" ]
then
    echo "git directory must be clean before running this script."
    exit 1
fi

./build-man.sh

changes=$(git status --porcelain)
if [ -n "$changes" ]
then
    echo "Detected changes in man pages:"
    echo "$changes"
    echo
    echo "Please run './build-man.sh' in the src/doc directory to rebuild the"
    echo "man pages, and commit the changes."
    exit 1
fi