Permalink
Switch branches/tags
v1.5.3-rc4.mingw.2 v1.5.3-rc4.mingw.1 msysGit-v0.6 msysGit-1.6.1-preview20090211 msysGit-1.5.4-rc0-preview20071217 WinGit-1.5.3-preview20071010 WinGit-0.2-alpha WinGit-0.1-alpha GitMe-0.4.2 Git-preview20080301 Git-preview20080221-with-git-svn Git-preview20080220-with-git-svn Git-preview20080219-with-git-svn Git-1.9.5-preview20150319 Git-1.9.5-preview20141217 Git-1.9.4-preview20140929 Git-1.9.4-preview20140815 Git-1.9.4-preview20140611 Git-1.9.2-preview20140411 Git-1.9.0-preview20140217 Git-1.8.5.2-preview20131230 Git-1.8.4-preview20130916 Git-1.8.3-preview20130601 Git-1.8.1.2-preview20130201 Git-1.8.0-preview20121022 Git-1.7.11-preview20120710 Git-1.7.11-preview20120704 Git-1.7.11-preview20120620 Git-1.7.10-preview20120409 Git-1.7.9-preview20120201 Git-1.7.8-preview20111206 Git-1.7.7.1-preview20111027 Git-1.7.7-preview20111014 Git-1.7.7-preview20111012 Git-1.7.6-preview20110720 Git-1.7.6-preview20110708 Git-1.7.4-preview20110204 Git-1.7.3.2-preview20101025 Git-1.7.3.1-preview20101002 Git-1.7.2.3-preview20100911 Git-1.7.1-preview20100612 Git-1.7.0.2-preview20100407.msysGit-netinstall Git-1.7.0.2-preview20100407-2.msysGit-netinstall Git-1.7.0.2-preview20100309 Git-1.7.0.2-preview20100309.msysGit-installers Git-1.6.5.1 Git-1.6.5.1-preview20100112-with-cheetah Git-1.6.4-preview20090730 Git-1.6.4-preview20090729 Git-1.6.3.2-preview20090608 Git-1.6.3.2-preview20090607 Git-1.6.3-preview20090507 Git-1.6.3-preview20090507-2 Git-1.6.2.2-preview20090408 Git-1.6.2.1-preview20090322 Git-1.6.2-preview20090308 Git-1.6.1-preview20081227 Git-1.6.0.2-preview20080923 Git-1.6.0.2-preview20080921 Git-1.5.6.1-preview20080701 Git-1.5.6-preview20080622 Git-1.5.5-preview20080413 Git-1.5.4-rc5-preview20080128 Git-1.5.4-rc3-preview20080113 Git-1.5.4-rc2-preview20071228 Git-1.5.4-rc0-preview20071217 Git-1.5.4-preview20080202 Git-1.5.3.6-preview20071126 Git-1.5.3.5-preview20071114 Git-1.5.3-preview20071027 Git-1.5.3-preview20071019
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
185 lines (147 sloc) 4.66 KB
# Copyright (C) 2001, 2002 Earnie Boyd <earnie@users.sf.net>
# This file is part of the Minimal SYStem.
# http://www.mingw.org/msys.shtml
#
# File: profile
# Description: Shell environment initialization script
# Last Revised: 2002.05.04
if [ -z "$MSYSTEM" ]; then
MSYSTEM=MINGW32
fi
# My decision to add a . to the PATH and as the first item in the path list
# is to mimick the Win32 method of finding executables.
#
# I filter the PATH value setting in order to get ready for self hosting the
# MSYS runtime and wanting different paths searched first for files.
if [ $MSYSTEM == MINGW32 ]; then
export PATH=".:/usr/local/bin:/mingw/bin:/bin:$PATH"
else
export PATH=".:/usr/local/bin:/bin:/mingw/bin:$PATH"
fi
# strip out cygwin paths from PATH
case "$PATH" in
*/cygwin/*)
export PATH=$(p=$(echo $PATH | tr ":" "\n" | grep -v "/cygwin/" | tr "\n" ":"); echo ${p%:})
;;
esac
if [ -z "$USERNAME" ]; then
LOGNAME="`id -un`"
else
LOGNAME="$USERNAME"
fi
# Set up USER's home directory
if [ -z "$HOME" -o ! -d "$HOME" ]; then
HOME="$HOMEDRIVE$HOMEPATH"
if [ -z "$HOME" -o ! -d "$HOME" ]; then
HOME="$USERPROFILE"
fi
fi
if [ ! -d "$HOME" ]; then
printf "\n\033[31mERROR: HOME directory '$HOME' doesn't exist!\033[m\n\n"
echo "This is an error which might be related to msysGit issue 108."
echo "You might want to set the environment variable HOME explicitly."
printf "\nFalling back to \033[31m/ ($(cd / && pwd -W))\033[m.\n\n"
HOME=/
fi
# normalize HOME to unix path
HOME="$(cd "$HOME" ; pwd)"
export PATH="$HOME/bin:$PATH"
export GNUPGHOME=~/.gnupg
if [ -z "$MAGIC" ]; then
magicfile=$(cd / && pwd -W)'/mingw/share/misc/magic.mgc'
test -f "$magicfile" && export MAGIC="$magicfile"
fi
if [ "x$HISTFILE" == "x/.bash_history" ]; then
HISTFILE=$HOME/.bash_history
fi
if [ -e ~/.inputrc ]; then
export INPUTRC=~/.inputrc
else
export INPUTRC=/etc/inputrc
fi
case "$LS_COLORS" in
*rs*)
# Our ls may ot handle LS_COLORS inherited in a Wine process
unset LS_COLORS;;
esac
export HOME LOGNAME MSYSTEM HISTFILE
for i in /etc/profile.d/*.sh ; do
if [ -f $i ]; then
. $i
fi
done
export MAKE_MODE=unix
# Git specific stuff
test -e /bin/git.exe -o -e /git/git.exe || {
echo
echo -------------------------------------------------------
echo "Building and Installing Git"
echo -------------------------------------------------------
cd /git &&
make install
case $? in
0)
MESSAGE="You are in the git working tree, and all is ready for you to hack."
;;
*)
MESSAGE="Your build failed... Please fix it, and give feedback on the Git list."
esac
test -d /installer-tmp && rm -rf /installer-tmp
cat <<EOF
-------------------------
Hello, dear Git developer.
This is a minimal MSYS environment to work on Git.
$MESSAGE
EOF
}
# let's make sure that the post-checkout hook is installed
test -d /.git && test ! -x /.git/hooks/post-checkout &&
test -x /share/msysGit/post-checkout-hook &&
mkdir -p /.git/hooks &&
cp /share/msysGit/post-checkout-hook /.git/hooks/post-checkout
test -z "$SKIP_MOTD" -a -f /etc/motd && sed "s/\$MESSAGE/$MESSAGE/" < /etc/motd
test -x /share/msysGit/initialize.sh -a ! -d /.git &&
cat << EOF
It appears that you installed msysGit using the full installer.
To set up the Git repositories, please run /share/msysGit/initialize.sh
EOF
case ":$PATH:" in
*:/cmd:*|*:/bin:*) ;;
*)
cat << EOF
In order to use Git from cmd.exe:
1. Add c:\msysgit\cmd to cmd's PATH
2. DON'T add c:\msysgit\bin or c:\msysgit\mingw\bin to cmd's PATH
Commands like 'git add' will work from cmd.exe now.
Commands like 'git-add' will NOT work. Add more wrappers as appropriate.
EOF
esac
. /git/contrib/completion/git-completion.bash
[ -r /git/contrib/completion/git-prompt.sh ] && . /git/contrib/completion/git-prompt.sh
# non-printable characters must be enclosed inside \[ and \]
PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]' # set window title
PS1="$PS1"'\n' # new line
PS1="$PS1"'\[\033[32m\]' # change color
PS1="$PS1"'\u@\h ' # user@host<space>
PS1="$PS1"'\[\033[33m\]' # change color
PS1="$PS1"'\w' # current working directory
if test -z "$WINELOADERNOEXEC"
then
PS1="$PS1"'$(__git_ps1)' # bash function
fi
PS1="$PS1"'\[\033[0m\]' # change color
PS1="$PS1"'\n' # new line
PS1="$PS1"'$ ' # prompt: always $
# set default options for 'less'
export LESS=-FRSX
export LESSCHARSET=utf-8
# set default protocol for 'plink'
export PLINK_PROTOCOL=ssh
# read user-specific settings, possibly overriding anything above
if [ -e ~/.bashrc ]; then
. ~/.bashrc
elif [ -e ~/.bash_profile ]; then
. ~/.bash_profile
elif [ -e /etc/bash_profile ]; then
. /etc/bash_profile
fi