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