Initial add of defaria.com
[clearscm.git] / defaria.com / GD / rc / profile
1 #!/bin/ksh
2 ################################################################################
3 #
4 # File:         $RCSfile: profile,v $
5 # Revision:     $Revision: 1.3 $
6 # Description:  ksh profile
7 # Author:       Andrew@DeFaria.com
8 # Created:      Thu Jun  6 08:31:57 PDT 1996
9 # Modified:     $Date: 2006/07/24 05:37:57 $
10 # Language:     ksh
11 #
12 # (c) Copyright 2000-2004, Andrew@DeFaria.com, all rights reserved.
13 #
14 ################################################################################
15 # Set ARCH, architecture of the machine
16
17 KERNEL=$(uname -s)
18 if [[ $KERNEL = CYGWIN* ]]; then
19   export ARCH=cygwin
20 elif [ $KERNEL = "Linux" ]; then
21   export ARCH=linux
22 elif [ $KERNEL = "SunOS" ]; then
23   export ARCH=sun
24 elif [ $KERNEL = "FreeBSD" ]; then
25   export ARCH=$KERNEL
26 else
27   echo "Warning: Unknown architecture ($KERNEL)"
28 fi
29
30 # Set colors
31 if [ -f ~/.rc/set_colors ]; then
32    . ~/.rc/set_colors
33 else
34   echo "Warning: ~/.rc/set_colors does not exist!"
35 fi
36
37 # Evil black magic for the ENV variable.  This was given to me by Ken Sumrall.
38 # Currently it's mystery is not explained but it prevents problems.  It
39 # basically determines if we are interactive or background and set up ENV
40 # properly.
41 export ENV='${START[(_$- = 1) + (_ = 0) - (_$- != _${-%%*i*}) ]}'
42 export START=~/.rc/kshrc
43
44 # Check to see if we're interactive
45 if [[ $- = *i* ]]; then
46   export interactive=true
47 else
48   export interactive=false
49 fi
50
51 if [ ! -f ~/.rc/kshrc ]; then
52   echo "Warning: ~/.rc/kshrc does not exist!"
53 fi
54
55 export HISTFILE=~/.bash_history
56 export VISUAL=vi
57 export EDITOR=edit
58 unset EDITOR
59
60 export SPEAKER=headphones
61
62 # Miscellaneous variables:
63 export ERRFILE=.vue/errorlog
64
65 # Terminal settings:
66 if [ "$TERM" = ""        -o \
67      "$TERM" = "unknown" -o \
68      "$TERM" = "dialup"  -o \
69      "$TERM" = "network" ]; then
70   if [ "$interactive" = "true" ]; then
71     eval $(ttytype -s -a -t ansi -t hp)
72   fi
73 fi
74
75 # System dependent variables.
76 if [ -f ~/.rc/system ]; then
77    . ~/.rc/system
78 else
79    echo "Warning ~/.rc/system does not exist!"
80    export SYSNAME="*Unknown Systemname*:"
81 fi
82
83 # Set my default printer
84 export LPDEST=ljmx2