| Server IP : 216.92.14.13 / Your IP : 216.73.217.126 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /bin/ |
Upload File : |
#!/bin/sh
#
# po4a-display-pod shows a translated pod document, recompiling everything on the fly with po4a.
# Translators can see the effects of their work without reinstalling everything.
#
MASTER=""
NAME=""
SECTION=""
PO=""
OPTIONS=""
usage () {
echo "Usage : $(basename $0) -m POD_FILE -p PO_FILE [-o PO4A_OPT]"
}
while getopts m:p:o:h option; do
case $option in
m)
MASTER=$OPTARG
;;
p)
PO=$OPTARG
;;
o)
OPTIONS="$OPTIONS $OPTARG"
;;
h)
usage
exit 0
;;
[?])
usage 1>&2
exit 1
;;
esac
done
if [ -z $PO ] || [ -z $MASTER ]; then
usage
exit 1
fi
if [ ! -f $PO ]; then
echo "Error: unable to find the file $PO."
usage
exit 1
fi
if [ ! -f $MASTER ]; then
echo "Error: unable to find the file $MASTER."
usage
exit 1
fi
# Can fail to retrieve the expected result with various files...
#NAME=$(basename $MASTER .pod | sed -e 's/\..//')
#SECTION=$(basename $MASTER .pod | sed -e 's/.*\.//')
po4a-translate -f pod -m $MASTER -p $PO -L UTF-8 -k 0 $OPTIONS \
| pod2man -r '' -c TRANSLATED -n $MASTER --utf8 \
| man -l -