File: makeman.sh

package info (click to toggle)
darktable 5.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 61,256 kB
  • sloc: ansic: 358,383; cpp: 100,542; xml: 19,788; lisp: 14,579; sh: 3,692; javascript: 3,264; perl: 1,888; python: 1,475; ruby: 975; makefile: 542; asm: 46; sql: 38; awk: 21
file content (18 lines) | stat: -rwxr-xr-x 407 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e;

input="$1"
authors="$2"
output="$3"

r=$(sed -n 's,.*\$Release: \(.*\)\$$,\1,p' "$input")
d=$(sed -n 's,/,-,g;s,.*\$Date: \(..........\).*,\1,p' "$input")
D=""
if [ -n "$d" ]; then
  D="--date=$d"
fi

pod2man --utf8 --release="darktable $r" --center="darktable" "$D" "$input" \
  | sed -e '/.*DREGGNAUTHORS.*/r '"$authors" | sed -e '/.*DREGGNAUTHORS.*/d' \
  > "$output" || rm "$output"