1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/print/yatex/files/DEINSTALL.tmpl

35 lines
1.0 KiB
Cheetah
Raw Normal View History

#!/bin/sh
pkgname=$1
CP=${CP:-%CP%}
ECHO=${ECHO:-%ECHO%}
GREP=${GREP:-%GREP%}
RM=${RM:-%RM%}
SED=${SED:-%SED%}
infodir=${INFODIR:-%INFODIR%}
infofiles=${INFOFILES:-%INFOFILES%}
sitestartdir=${SITESTARTDIR:-%SITESTARTDIR%}
elispdir=${ELISPDIR:-%ELISPDIR%}
OptionStart=";;; configuration options for ${pkgname}"
OptionEnd=";;; End of configuration options for ${pkgname}"
if [ "X$2" = X"DEINSTALL" ]; then
${ECHO} "Deleting entry for \"${pkgname}\" from ${infodir}/dir"
for file in `echo ${infofiles} | ${SED} "s,:, ,g"`; do
install-info --delete ${infodir}/${file} ${infodir}/dir
done
if [ X"${sitestartdir}" != X ] && \
[ "`grep \"^${OptionStart}\" ${sitestartdir}/site-start.el`" ]; then
${ECHO} "Deleting entry for \"${pkgname}\" from ${sitestartdir}/site-start.el"
${SED} -e "/^${OptionStart}/,/^${OptionEnd}/d" \
${sitestartdir}/site-start.el > ${sitestartdir}/site-start.el.bak
${CP} ${sitestartdir}/site-start.el.bak ${sitestartdir}/site-start.el
${RM} ${sitestartdir}/site-start.el.bak
fi
else
exit 0
fi