#!/bin/sh set -e ( printf ".TH expiration-check 1 \"%s\" \"Manual of expiration-check\"\n" "$(date +'%Y-%m-%d')" printf ".LO 1\n" ./build/expiration-check-linux-amd64 -h \ | sed -E 's/^([A-Z ]+):$/.SH \1/g' \ | sed -E 's/^ (.+) (.+)/.TP\n.B \1\n\2\n\n/g' \ | sed -E 's/^ (\w+)/\1/g' \ | sed -E 's/\\{0}-([a-z]+)/\\-\1/g' \ | sed -E 's/-\\-/\\-\\-/g' \ | sed -E 's/\s+$//g' ) | gzip -9 > ./build/expiration-check.1.gz