File: generate-docs.sh

package info (click to toggle)
rust-sudo-rs 0.2.5-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,768 kB
  • sloc: sh: 160; makefile: 31; ansic: 1
file content (15 lines) | stat: -rwxr-xr-x 380 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

docs_dir="docs/man"
output_dir="target/docs/man"
files=("sudo.8" "visudo.8" "sudoers.5" "su.1")

mkdir -p "$output_dir"

for f in "${files[@]}"; do
    origin_file="$docs_dir/$f.md"
    target_file="$output_dir/$f"

    echo "Generating man page for $f from '$origin_file' to '$target_file'"
    util/pandoc.sh -s -t man "$origin_file" -o "$target_file"
done