--- navigator-v406.x86-bsdi-bsd2/ns-install.orig	Thu Mar 26 20:48:42 1998
+++ navigator-v406.x86-bsdi-bsd2/ns-install	Sun Jun 21 20:56:02 1998
@@ -87,21 +87,9 @@
 fi
 
 #
-# If MOZILLA_HOME is set, assume that is the place to install.
-# Otherwise, make an educated guess at the "right" default
-# directory.
+# We use OpenBSD's ports environment instead.
 #
-if test ! -z "${MOZILLA_HOME}"
-then
-	INSTALL_DIR="${MOZILLA_HOME}"
-else
-	if test -d /opt
-	then
-		INSTALL_DIR="/opt/netscape"
-	else
-		INSTALL_DIR="/usr/local/netscape"
-	fi
-fi
+INSTALL_DIR="${PREFIX}/netscape"
 
 #
 # See if we have to use the lame SYS-V echo command flags.
@@ -139,46 +127,19 @@
 	fi
 done
 
-echo ""
-echo "Please specify the directory path under which the software will be"
-echo "installed.  The default directory is ${INSTALL_DIR}, but you may"
-echo "install anywhere you wish (if you have permission to do so)."
-echo ""
 flag=1
 while test ${flag} -eq 1
 do
-	${ECHO} "Location for ${PRODUCT} software [${INSTALL_DIR}]: ${ENDER}"
-	read TARGET
-	if test -z "${TARGET}"
-	then
-		TARGET="${INSTALL_DIR}"
-	fi
-	if test ! -z "`echo ${TARGET} | grep '~'`"
-	then
-		TARGET=`echo ${TARGET} | sed "s:~:${HOME}:"`
-	fi
+	TARGET="${INSTALL_DIR}"
 
 	flag=0
 	if test ! -d ${TARGET}
 	then
-		echo ""
-		${ECHO} "${TARGET}: No such directory.  Do you wish to create it? (y/n)[y] ${ENDER}"
-		read check
-		if test "${check}" = "n" -o "${check}" = "N"
+		mkdir -p ${TARGET}
+		if test $? -ne 0
 		then
-			flag=1
-		else
-			#
-			# The -p flag may cause an error on some HP-UX systems.
-			# Removing the -p will work for 'basename TARGET' as long
-			# as 'dirname TARGET' exists.
-			#
-			mkdir -p ${TARGET}
-			if test $? -ne 0
-			then
-				echo "ERROR: Problem creating ${TARGET}"
-				exit 2
-			fi
+		    echo "ERROR: Problem creating ${TARGET}"
+		    exit 2
 		fi
 	else
 		echo ""
@@ -186,13 +147,13 @@
 		echo ""
 		echo "The existing contents may be modified or replaced if you install in"
 		echo "this directory.  If you choose not to install in '${TARGET}',"
-		echo "you will be prompted for a different directory."
+		echo "you should set your PREFIX environment variable and try again."
 		echo ""
 		${ECHO} "Do you wish to install in '${TARGET}'? (y/n)[y] ${ENDER}"
 		read check
 		if test "${check}" = "n" -o "${check}" = "N"
 		then
-			flag=1
+		    exit 2
 		fi
 	fi
 
@@ -203,9 +164,9 @@
 		then
 			echo ""
 			echo "You do not have write permission in ${TARGET}."
-			echo "Change the permissions, or select another directory, and try again."
+			echo "Change the permissions and try again."
 			echo ""
-			flag=1
+			exit 2
 		else
 			/bin/rm -f ${TARGET}/${TESTFILE}
 		fi
