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