games/vera: Clean up douninst.sh.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-03-08 01:27:56 -05:00 committed by Willy Sudiarto Raharjo
parent 4df9d85226
commit ae3ec6324b
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 8 additions and 17 deletions

View file

@ -1,17 +1,6 @@
# 20211015 bkw: I was going to have a douninst.sh that runs
# /usr/bin/install-info --delete /usr/info/xroar.info.gz /usr/info/dir
# but this won't work because removepkg has already deleted
# /usr/info/xroar.info.gz before it runs douninst.sh. And you can't
# use install-info to remove stuff *by name* from /usr/info/dir;
# the info file must actually exist.
# So the script has to manually remove the entry from the info dir,
# and the Emulators section if it's become empty.
if [ -e usr/info/dir ]; then
# Remove the entry first:
sed -i '/^\* V\.E\.R.\A\.:/d' usr/info/dir
# If the Dictionaries section is empty now, remove it too:
if grep -A1 '^Dictionaries$' usr/info/dir | tail -1 | grep -q '^$'; then
sed -i '/^Dictionaries$/,+1d' usr/info/dir
fi
if [ -x /usr/bin/install-info -a -d usr/info ]; then
( cd usr/info
rm -f dir
for i in *.info*; do /usr/bin/install-info $i dir 2>/dev/null; done
)
fi

View file

@ -6,6 +6,8 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230308 bkw: BUILD=3, make douninst.sh less fugly.
# 20211015 bkw: BUILD=2
# - fix character encoding and formatting.
# - fix info node structure and dir entry.
@ -22,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=vera
VERSION=${VERSION:-1.24}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}