dot.profile revision 1.4
11.4Scgd#	$NetBSD: dot.profile,v 1.4 1999/06/26 06:12:58 cgd Exp $
21.1Sscottr#
31.1Sscottr# Copyright (c) 1995 Jason R. Thorpe
41.1Sscottr# Copyright (c) 1994 Christopher G. Demetriou
51.1Sscottr# All rights reserved.
61.1Sscottr# 
71.1Sscottr# Redistribution and use in source and binary forms, with or without
81.1Sscottr# modification, are permitted provided that the following conditions
91.1Sscottr# are met:
101.1Sscottr# 1. Redistributions of source code must retain the above copyright
111.1Sscottr#    notice, this list of conditions and the following disclaimer.
121.1Sscottr# 2. Redistributions in binary form must reproduce the above copyright
131.1Sscottr#    notice, this list of conditions and the following disclaimer in the
141.1Sscottr#    documentation and/or other materials provided with the distribution.
151.1Sscottr# 3. All advertising materials mentioning features or use of this software
161.1Sscottr#    must display the following acknowledgement:
171.1Sscottr#	This product includes software developed by Christopher G. Demetriou.
181.1Sscottr# 4. The name of the author may not be used to endorse or promote products
191.1Sscottr#    derived from this software without specific prior written permission
201.1Sscottr#
211.1Sscottr# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.1Sscottr# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.1Sscottr# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.1Sscottr# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.1Sscottr# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.1Sscottr# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.1Sscottr# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.1Sscottr# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.1Sscottr# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.1Sscottr# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.1Sscottr#
321.1Sscottr
331.1SscottrPATH=/sbin:/bin:/usr/bin:/usr/sbin:/
341.1Sscottrexport PATH
351.1SscottrTERM=vt220
361.1Sscottrexport TERM
371.3SperryHOME=/
381.3Sperryexport HOME
391.1Sscottr
401.1Sscottrumask 022
411.1Sscottr
421.1Sscottrif [ "X${DONEPROFILE}" = "X" ]; then
431.1Sscottr	DONEPROFILE=YES
441.4Scgd	export DONEPROFILE
451.1Sscottr
461.1Sscottr	# set up some sane defaults
471.1Sscottr	echo 'erase ^H, werase ^W, kill ^U, intr ^C'
481.1Sscottr	stty newcrt werase ^W intr ^C kill ^U erase ^H 9600
491.1Sscottr
501.1Sscottr	# run update, so that installed software is written as it goes.
511.1Sscottr	update
521.1Sscottr
531.1Sscottr	# get the terminal type
541.1Sscottr	_forceloop=""
551.1Sscottr	while [ "X${_forceloop}" = X"" ]; do
561.2Sscottr		eval `tset -s -m ":?$TERM"`
571.1Sscottr		if [ "X${TERM}" != X"unknown" ]; then
581.1Sscottr			_forceloop="done"
591.1Sscottr		fi
601.1Sscottr	done
611.1Sscottr
621.1Sscottr	# Installing or upgrading?
631.1Sscottr	_forceloop=""
641.1Sscottr	while [ "X${_forceloop}" = X"" ]; do
651.1Sscottr		echo -n '(I)nstall or (U)pgrade? '
661.1Sscottr		read _forceloop
671.1Sscottr		case "$_forceloop" in
681.1Sscottr			i*|I*)
691.1Sscottr				/install
701.1Sscottr				;;
711.1Sscottr
721.1Sscottr			u*|U*)
731.1Sscottr				/upgrade
741.1Sscottr				;;
751.1Sscottr
761.1Sscottr			*)
771.1Sscottr				_forceloop=""
781.1Sscottr				;;
791.1Sscottr		esac
801.1Sscottr	done
811.1Sscottrfi
82