diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/fontforge/fontforge.SlackBuild | 11 |
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 |