1#!/bin/sh 2 3# 4# Generate the man pages. 5# 6# We are just here to substitute the @VERSION@ string with our real version. 7# 8 9if [ $# -lt 3 ]; then 10 echo Usage: mangen.sh VERSION IN OUT 11 exit 1 12fi 13 14VERSION=$1 15IN=$2 16OUT=$3 17 18# 19# MacOS's groff is missing .UR and .UE support, which makes 20# URL completely disappear from man pages. We need to strip 21# those codes out when building for MacOS 22# 23if [ $(uname -s) = "Darwin" ]; then 24 RMURUE='-e s/\.UR.//g -e s/\.UE//g' 25else 26 RMURUE="" 27fi 28 29sed -e "s|@VERSION[@]|$VERSION|g" $RMURUE $IN >$OUT 30