summaryrefslogtreecommitdiffstats
path: root/print/dvips
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1999-05-24 02:25:48 +0000
committersteve <steve@FreeBSD.org>1999-05-24 02:25:48 +0000
commitcb01ad8d84226a3ce8de9d9a57e289a048a62252 (patch)
tree24aa0f6e78e3c6b699285321d207b8fb214ce4a0 /print/dvips
parentd1d53f5407837d56eca862774bbf00d6411e808b (diff)
downloadFreeBSD-ports-cb01ad8d84226a3ce8de9d9a57e289a048a62252.zip
FreeBSD-ports-cb01ad8d84226a3ce8de9d9a57e289a048a62252.tar.gz
Deinstall without interaction while package building and don't display
the deinstall message twice, one for DEINTALL and one for POST-DEINSTALL.
Diffstat (limited to 'print/dvips')
-rw-r--r--print/dvips/pkg-deinstall13
1 files changed, 10 insertions, 3 deletions
diff --git a/print/dvips/pkg-deinstall b/print/dvips/pkg-deinstall
index 290b365..93a0d61 100644
--- a/print/dvips/pkg-deinstall
+++ b/print/dvips/pkg-deinstall
@@ -1,5 +1,9 @@
#!/bin/sh
+if [ "$2" = "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
prefix=/usr/local
cat << END
@@ -10,12 +14,15 @@ this file now.
END
-echo -n "do you want to deinstall the package ? [y] "
-read answ; if [ "$answ" = "" ]; then answ=y; fi
+if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "do you want to deinstall the package ? [y] " answ
+ if [ "$answ" = "" ]; then answ=y; fi
+else
+ answ="y"
+fi
case $answ in
y*|Y*) break;;
*) exit 1;;
esac
exit 0
-
OpenPOWER on IntegriCloud