1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/packages/scripts/man-pdf.sh
2020-04-09 16:56:47 +02:00

13 lines
236 B
Bash
Executable File

#!/bin/sh
if [ "$#" -eq 1 ]; then
man_entry="$1"
elif [ $# -eq 2 ]; then
man_page="$1"
man_entry="$2"
else
echo >/dev/stderr "Usage: $0 [MAN-PAGE] ENTRY"
exit 1
fi
man "${man_page:-}" "$man_entry" | ps2pdf - "$man_entry.pdf"