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