1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/print/yatex/files/INSTALL.tmpl

53 lines
1.5 KiB
Cheetah
Raw Normal View History

#!/bin/sh
pkgname=$1
BASENAME=${BASENAME:-%%BASENAME%%}
CP=${CP:-%%CP%%}
ECHO=${ECHO:-%%ECHO%%}
GREP=${GREP:-%%GREP%%}
SED=${SED:-%%SED%%}
TOUCH=${TOUCH:-%%TOUCH%%}
CUT=${CUT:-%%CUT%%}
DO_NADA=${DO_NADA:-%%DO_NADA%%}
CUT=/usr/bin/cut
EXPR=/bin/expr
infodir=${INFODIR:-%%INFODIR%%}
infofiles=${INFOFILES:-%%INFOFILES%%}
infonodes=${INFONODES:-%%INFONODES%%}
infonodeexps=${INFONODEEXPS:-%%INFONODEEXPS%%}
dirsection=${DIRSECTION:-%%DIRSECTION%%}
if [ "X$2" = X"POST-INSTALL" ]; then
count=1
# For example, the result of `cut ttt -d : -f 2` is ttt. Why?
infofiles=${infofiles}:
while ${DO_NADA}; do
if [ X`${ECHO} ${infofiles} | ${CUT} -d : -f $count` = X ]; then
break
fi
file=`${ECHO} ${infofiles} | ${CUT} -d : -f $count`
nodename=`${ECHO} ${infonodes} | ${CUT} -d : -f $count`
nodeexp=`${ECHO} ${infonodeexps} | ${CUT} -d : -f $count`
if [ ! "`${GREP} \"START-INFO-DIR-ENTRY\" ${infodir}/${file}`" ]; then
${ECHO} "INFO-DIR-SECTION ${dirsection}" \
>> ${infodir}/${file}
${ECHO} "START-INFO-DIR-ENTRY" >> ${infodir}/${file}
${ECHO} "* ${nodename}: (`${BASENAME} ${file}`). ${nodeexp}" \
>> ${infodir}/${file}
${ECHO} "END-INFO-DIR-ENTRY" >> ${infodir}/${file}
fi
count=`${EXPR} $count + 1`
done
if [ %%EMACS%% != xemacs ]; then
${ECHO} "Adding entry for \"${pkgname}\" to ${infodir}/dir"
for file in `${ECHO} ${infofiles} | ${SED} "s,:, ,g"`; do
install-info ${infodir}/${file} ${infodir}/dir
done
fi
exit 0
else
exit 0
fi