dot.profile revision 1.3
11.3Sperry# $NetBSD: dot.profile,v 1.3 1998/01/09 21:51:46 perry 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.1Sscottr 451.1Sscottr # set up some sane defaults 461.1Sscottr echo 'erase ^H, werase ^W, kill ^U, intr ^C' 471.1Sscottr stty newcrt werase ^W intr ^C kill ^U erase ^H 9600 481.1Sscottr 491.1Sscottr # run update, so that installed software is written as it goes. 501.1Sscottr update 511.1Sscottr 521.1Sscottr # get the terminal type 531.1Sscottr _forceloop="" 541.1Sscottr while [ "X${_forceloop}" = X"" ]; do 551.2Sscottr eval `tset -s -m ":?$TERM"` 561.1Sscottr if [ "X${TERM}" != X"unknown" ]; then 571.1Sscottr _forceloop="done" 581.1Sscottr fi 591.1Sscottr done 601.1Sscottr 611.1Sscottr # Installing or upgrading? 621.1Sscottr _forceloop="" 631.1Sscottr while [ "X${_forceloop}" = X"" ]; do 641.1Sscottr echo -n '(I)nstall or (U)pgrade? ' 651.1Sscottr read _forceloop 661.1Sscottr case "$_forceloop" in 671.1Sscottr i*|I*) 681.1Sscottr /install 691.1Sscottr ;; 701.1Sscottr 711.1Sscottr u*|U*) 721.1Sscottr /upgrade 731.1Sscottr ;; 741.1Sscottr 751.1Sscottr *) 761.1Sscottr _forceloop="" 771.1Sscottr ;; 781.1Sscottr esac 791.1Sscottr done 801.1Sscottrfi 81