File: validate-man.sh

package info (click to toggle)
rust-cargo 0.86.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,088 kB
  • sloc: javascript: 408; sh: 306; python: 87; xml: 21; makefile: 6
file content (27 lines) | stat: -rwxr-xr-x 597 bytes parent folder | download | duplicates (21)
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
27
#!/bin/bash
# This script validates that there aren't any changes to the man pages.

set -e

cargo_man="src/doc"
mdman_man="crates/mdman/doc"

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

cargo build-man

changes=$(git status --porcelain -- $cargo_man $mdman_man)
if [ -n "$changes" ]
then
    echo "Detected changes of man pages:"
    echo "$changes"
    echo
    echo 'Please run `cargo build-man` to rebuild the man pages'
    echo "and commit the changes."
    exit 1
fi