graphics/fontforge: Update the pre-install catcher.

Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
This commit is contained in:
Dave Woodfall 2022-03-09 18:02:55 +00:00 committed by Andrew Clemons
parent 2ff7528122
commit 3f7e2ce61e
No known key found for this signature in database
GPG Key ID: CD26380FFACBDA2B
1 changed files with 8 additions and 3 deletions

View File

@ -44,9 +44,14 @@ FREETYPE=${FREETYPE:-2.11.1}
GNULIB=${GNULIB:-0.1}
UTHASH=${UTHASH:-2.3.0}
if [ -f "$( echo /var/lib/pkgtools/packages/$PRGNAM-*-*-* )" ]; then
echo "Please uninstall any previous versions of $PRGNAM first."
echo "Exiting."
# This ought to be more reliable than testing if a package DB file
# exists. A little convoluted perhaps.
if $PRGNAM -v 2>/dev/null |
sed -n "s,^\($PRGNAM .*\),Found existing installation:\n \n\1,p
n;p;a\ " | grep -v "^$"; then
echo "Please uninstall any previous versions of $PRGNAM before building
a new one."
exit 1
fi