dot.profile revision 1.1
11.1Sscottr# $NetBSD: dot.profile,v 1.1 1997/09/22 23:37:20 scottr 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.1Sscottr 381.1Sscottrumask 022 391.1Sscottr 401.1Sscottrif [ "X${DONEPROFILE}" = "X" ]; then 411.1Sscottr DONEPROFILE=YES 421.1Sscottr 431.1Sscottr # set up some sane defaults 441.1Sscottr echo 'erase ^H, werase ^W, kill ^U, intr ^C' 451.1Sscottr stty newcrt werase ^W intr ^C kill ^U erase ^H 9600 461.1Sscottr 471.1Sscottr # run update, so that installed software is written as it goes. 481.1Sscottr update 491.1Sscottr 501.1Sscottr # get the terminal type 511.1Sscottr _forceloop="" 521.1Sscottr while [ "X${_forceloop}" = X"" ]; do 531.1Sscottr # eval `tset -s -m ":?$TERM"` 541.1Sscottr if [ "X${TERM}" != X"unknown" ]; then 551.1Sscottr _forceloop="done" 561.1Sscottr fi 571.1Sscottr done 581.1Sscottr 591.1Sscottr # Installing or upgrading? 601.1Sscottr _forceloop="" 611.1Sscottr while [ "X${_forceloop}" = X"" ]; do 621.1Sscottr echo -n '(I)nstall or (U)pgrade? ' 631.1Sscottr read _forceloop 641.1Sscottr case "$_forceloop" in 651.1Sscottr i*|I*) 661.1Sscottr /install 671.1Sscottr ;; 681.1Sscottr 691.1Sscottr u*|U*) 701.1Sscottr /upgrade 711.1Sscottr ;; 721.1Sscottr 731.1Sscottr *) 741.1Sscottr _forceloop="" 751.1Sscottr ;; 761.1Sscottr esac 771.1Sscottr done 781.1Sscottrfi 79