mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-14 23:46:10 +00:00
bd566e33a3
PR: 8752 Submitted by: Satoshi Taoka <taoka@infonets.hiroshima-u.ac.jp> (= maintainer)
35 lines
1.0 KiB
Bash
35 lines
1.0 KiB
Bash
#!/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
|