aboutsummaryrefslogtreecommitdiff
path: root/graphics/fontforge
diff options
context:
space:
mode:
authorDave Woodfall <dave@slackbuilds.org>2022-03-09 18:02:55 +0000
committerAndrew Clemons <andrew.clemons@gmail.com>2022-03-10 12:16:05 +1300
commit3f7e2ce61ecc52119dc33bc0ed8afbb53cacd528 (patch)
tree652cc2176ae67897f693356449ad87f448112a9d /graphics/fontforge
parent2ff7528122e117997897292c83b31ff235c8b449 (diff)
graphics/fontforge: Update the pre-install catcher.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Diffstat (limited to 'graphics/fontforge')
-rw-r--r--graphics/fontforge/fontforge.SlackBuild11
1 files changed, 8 insertions, 3 deletions
diff --git a/graphics/fontforge/fontforge.SlackBuild b/graphics/fontforge/fontforge.SlackBuild
index e811f37a5c82..e69e132623f7 100644
--- a/graphics/fontforge/fontforge.SlackBuild
+++ b/graphics/fontforge/fontforge.SlackBuild
@@ -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