mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-08 23:06:56 +00:00
7ca69fdf61
files can be shared between this port and japanese/w3. Note this is a "blind" commit; it is too much trouble to test an update with this many added and deleted files. I'll test it later. PR: 3788 Submitted by: <kiri@kiri.toba-cmt.ac.jp>
32 lines
1.1 KiB
Bash
32 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
infodir=${INFODIR:-%INFODIR%}
|
|
infofile=${INFOFILE:-%INFOFILE%}
|
|
elispdir=${ELISPDIR:-%ELISPDIR%}
|
|
addir=${ADDIR:-%ADDIR%}
|
|
|
|
if [ "X$2" = X"DEINSTALL" ]; then
|
|
echo "Deleting \"w3\" entry from ${infodir}/dir"
|
|
install-info --delete ${infodir}/${infofile} ${infodir}/dir
|
|
OptionStart=";;; Emacs-w3 configuration options"
|
|
OptionEnd=";;; End of Emacs-w3 configuration options"
|
|
if [ "`grep \"^${OptionStart}\" ${elispdir}/site-start.el`" ]; then
|
|
echo "Deleting \"w3\" entry from ${elispdir}/site-start.el"
|
|
sed -e "/^${OptionStart}/,/^${OptionEnd}/d"\
|
|
${elispdir}/site-start.el \
|
|
> ${elispdir}/site-start.el.bak
|
|
mv ${elispdir}/site-start.el.bak ${elispdir}/site-start.el
|
|
fi
|
|
OptionStart="!!! Emacs-w3 configuration options"
|
|
OptionEnd="!!! End of Emacs-w3 configuration options"
|
|
if [ "`grep \"^${OptionStart}\" ${addir}/Emacs`" ]; then
|
|
echo "Deleting \"w3\" entry from ${addir}/Emacs"
|
|
sed -e 's/^![ ]*\(Emacs\*w3-.*\)$/&/' \
|
|
-e "/^${OptionStart}/,/^${OptionEnd}/d" \
|
|
${addir}/Emacs > ${addir}/Emacs.bak
|
|
mv ${addir}/Emacs.bak ${addir}/Emacs
|
|
fi
|
|
else
|
|
exit 0
|
|
fi
|