mirror of
https://github.com/kmein/niveum
synced 2026-03-20 03:51:07 +01:00
fix(packages): move to overlays
This commit is contained in:
17
packages/scripts/man-pdf.nix
Normal file
17
packages/scripts/man-pdf.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ writeShellScriptBin, ghostscript, man }:
|
||||
let
|
||||
name = "man-pdf";
|
||||
in writeShellScriptBin name ''
|
||||
if [ $# -eq 1 ]; then
|
||||
man_entry="$1"
|
||||
elif [ $# -eq 2 ]; then
|
||||
man_page="$1"
|
||||
man_entry="$2"
|
||||
else
|
||||
echo >/dev/stderr "Usage: ${name} [MAN-PAGE] ENTRY"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "${man}/bin/man "''${man_page:-}" "$man_entry" | ${ghostscript}/bin/ps2pdf - "$man_entry.pdf""
|
||||
${man}/bin/man "''${man_page:-}" "$man_entry" | ${ghostscript}/bin/ps2pdf - "$man_entry.pdf"
|
||||
''
|
||||
Reference in New Issue
Block a user