mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-01 22:05:08 +00:00
05ec898c2c
PR: ports/4412 Submitted by: Satoshi Taoka <taoka@infonets.hiroshima-u.ac.jp>
33 lines
936 B
Bash
33 lines
936 B
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%}
|
|
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 [ "`grep \"^${OptionStart}\" ${elispdir}/site-start.el`" ]; then
|
|
${ECHO} "Deleting entry for \"${pkgname}\" from ${elispdir}/site-start.el"
|
|
${SED} -e "/^${OptionStart}/,/^${OptionEnd}/d" \
|
|
${elispdir}/site-start.el > ${elispdir}/site-start.el.bak
|
|
${CP} ${elispdir}/site-start.el.bak ${elispdir}/site-start.el
|
|
${RM} ${elispdir}/site-start.el.bak
|
|
fi
|
|
else
|
|
exit 0
|
|
fi
|