Skip to content

Commit 0b3037c

Browse files
committed
Merge pull request #71 from nalla/bashrc
git-extra: fix call of `~/.bashrc`
2 parents 85541b4 + 636c489 commit 0b3037c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

git-extra/PKGBUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ package() {
4646
install -m755 $startdir/git-prompt.sh $pkgdir/etc/profile.d
4747
install -m755 $startdir/aliases.sh $pkgdir/etc/profile.d
4848
install -m755 $startdir/env.sh $pkgdir/etc/profile.d
49+
install -m755 $startdir/bash_profile.sh $pkgdir/etc/profile.d
4950
install -m644 $startdir/msys2-32.ico $pkgdir/usr/share/git
5051
install -m644 $startdir/99-post-install-cleanup.post $pkgdir/etc/post-install
5152
}

git-extra/bash_profile.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# add ~/.bash_profile if needed for executing ~/.bashrc
2+
if [ -e ~/.bashrc -a ! -e ~/.bash_profile -a ! -e ~/.bash_login -a ! -e ~/.profile ]; then
3+
printf "\n\033[31mWARNING: Found ~/.bashrc but no ~/.bash_profile, ~/.bash_login or ~/.profile.\033[m\n\n"
4+
echo "This looks like an incorrect setup."
5+
echo "A ~/.bash_profile containing \"if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\" will be created for you."
6+
echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" > ~/.bash_profile
7+
fi

0 commit comments

Comments
 (0)