mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
08b59aad31
Co-Authored-By: Qyriad <qyriad@qyriad.me> Co-Authored-By: Robert Hensing <robert@roberthensing.nl> Co-Authored-By: eldritch horrors <pennae@lix.systems> Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com> Co-authored-by: Tom Bereknyei <tomberek@gmail.com>
26 lines
405 B
Bash
Executable File
26 lines
405 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
lowdown_args=
|
|
|
|
if [ "$1" = --out-no-smarty ]; then
|
|
lowdown_args=--out-no-smarty
|
|
shift
|
|
fi
|
|
|
|
[ "$#" = 4 ] || {
|
|
echo "wrong number of args passed" >&2
|
|
exit 1
|
|
}
|
|
|
|
title="$1"
|
|
section="$2"
|
|
infile="$3"
|
|
outfile="$4"
|
|
|
|
(
|
|
printf "Title: %s\n\n" "$title"
|
|
cat "$infile"
|
|
) | lowdown -sT man --nroff-nolinks $lowdown_args -M section="$section" -o "$outfile"
|