GitMe SuperFetch
[msysgit.git] / etc / profile
bloba350397f2b39ed0ee25ef05c34c811c1123ce1ce
1 # Copyright (C) 2001, 2002  Earnie Boyd  <earnie@users.sf.net>
2 # This file is part of the Minimal SYStem.
3 #   http://www.mingw.org/msys.shtml
5 #         File: profile
6 #  Description: Shell environment initialization script
7 # Last Revised: 2002.05.04
9 if [ -z "$MSYSTEM" ]; then
10   MSYSTEM=MINGW32
13 # My decision to add a . to the PATH and as the first item in the path list
14 # is to mimick the Win32 method of finding executables.
16 # I filter the PATH value setting in order to get ready for self hosting the
17 # MSYS runtime and wanting different paths searched first for files.
18 if [ $MSYSTEM == MINGW32 ]; then
19   export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH"
20 else
21   export PATH=".:/usr/local/bin:/bin:/mingw/bin:$PATH"
24 if [ -z "$USERNAME" ]; then
25   LOGNAME="`id -un`"
26 else
27   LOGNAME="$USERNAME"
30 # Set up USER's home directory
31 if [ -z "$HOME" ]; then
32   HOME="/home/$LOGNAME"
35 export PATH="$HOME/bin:$PATH"
37 if [ ! -d "$HOME" ]; then
38   mkdir -p "$HOME"
41 export GNUPGHOME=~/.gnupg
43 if [ "x$HISTFILE" == "x/.bash_history" ]; then
44   HISTFILE=$HOME/.bash_history
47 if [ -e ~/.inputrc ]; then
48     export INPUTRC=~/.inputrc
49 else
50     export INPUTRC=/etc/inputrc
53 export HOME LOGNAME MSYSTEM HISTFILE
55 for i in /etc/profile.d/*.sh ; do
56   if [ -f $i ]; then
57     . $i
58   fi
59 done
61 export MAKE_MODE=unix
62 export PS1='\[\033]0;$MSYSTEM:\w\007
63 \033[32m\]\u@\h \[\033[33m\w\033[0m\]
64 $ '
66 alias clear=clsb
68 if [ -e ~/.bashrc ]; then
69     . ~/.bashrc
70 elif [ -e ~/.bash_profile ]; then
71     . ~/.bash_profile
72 elif [ -e /etc/bash_profile ]; then
73     . /etc/bash_profile
76 # Git specific stuff
77 test -e /bin/git.exe || {
78         echo
79         echo -------------------------------------------------------
80         echo "Building and Installing Git"
81         echo -------------------------------------------------------
83         cd /git &&
84         make install
86         case $? in
87         0)
88                 MESSAGE="You are in the git working tree, and all is ready for you to hack."
89         ;;
90         *)
91                 MESSAGE="Your build failed...  Please fix it, and give feedback on the Git list."
92         esac
94         test -d /installer-tmp && rm -rf /installer-tmp
96         cat <<EOF
99 -------------------------
100 Hello, dear Git developer.
102 This is a minimal MSYS environment to work on Git.
104 $MESSAGE
106 Have fun!
110 . /git/contrib/completion/git-completion.bash
112 export LESS=-FRSX