Move the git submodule url to git://repo.or.cz/git/mingw/4msysgit.git
[git/jnareb-git.git] / etc / profile
blobcb61b39ed33a89e046e2aa1f8d7d7bf573f903b4
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
4
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 export HOME LOGNAME MSYSTEM HISTFILE
49 for i in /etc/profile.d/*.sh ; do
50   if [ -f $i ]; then
51     . $i
52   fi
53 done
55 export MAKE_MODE=unix
56 export PS1='\[\033]0;$MSYSTEM:\w\007
57 \033[32m\]\u@\h \[\033[33m\w\033[0m\]
58 $ '
60 alias clear=clsb
62 cd "$HOME"
64 test -e .bash_profile && . .bash_profile
66 test -e /bin/git.exe || {
67         echo "Setting up git"
69         cd /git &&
70         make install &&
71         git init &&
72         git config remote.origin.url git://repo.or.cz/git/mingw.git &&
73         git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' &&
74         git config remote.mob.url repo.or.cz:/srv/git/git/mingw.git &&
75         git config remote.mob.fetch +refs/remote/mob:refs/remotes/origin/mob &&
76         git config remote.mob.push master:mob &&
77         echo &&
78         echo "Fetching the MinGW repository from repo.or.cz" &&
79         (git fetch ||
80                 (git config remote.origin.url http://repo.or.cz/r/git/mingw.git &&
81                 git fetch)) &&
82         git reset 382210f715c0e1ef7a19eb10977dae4265a2c88f
83         
84         case $? in
85         0)
86                 MESSAGE="You are in the git working tree, and all is ready for you to hack."
87         ;;
88         *)
89                 MESSAGE="Your build failed...  Please fix it, and give feedback on the Git list."
90         esac
92         cat <<EOF
95 -------------------------
96 Hello, dear Git developer.
98 This is a minimal MSYS environment to work on Git.
100 $MESSAGE
102 Have fun!
106 . /git/contrib/completion/git-completion.bash