mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +02: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>
25 lines
405 B
Bash
Executable file
25 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"
|