Rather do it in bootstrap-haskell

This commit is contained in:
Julian Ospald 2021-08-31 23:23:59 +02:00
parent 34df41b44a
commit 3f710112f3
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
2 changed files with 7 additions and 2 deletions

View File

@ -372,6 +372,13 @@ adjust_bashrc() {
echo "[[ -f ~/.bashrc ]] && source ~/.bashrc # ghcup-env" >> "${HOME}/.bash_profile"
fi
;;
MSYS*|MINGW*)
if [ ! -e "${HOME}/.bash_profile" ] ; then
echo '# generated by ghcup' > "${HOME}/.bash_profile"
echo 'test -f ~/.profile && . ~/.profile' >> "${HOME}/.bash_profile"
echo 'test -f ~/.bashrc && . ~/.bashrc' >> "${HOME}/.bash_profile"
fi
;;
esac
break ;;

View File

@ -414,8 +414,6 @@ if (!(Test-Path -Path ('{0}' -f $MsysDir))) {
Print-Msg -msg 'Setting default home directory...'
Exec "$Bash" '-lc' "sed -i -e 's/db_home:.*$/db_home: windows/' /etc/nsswitch.conf"
Print-Msg -msg "Creating ~/.bash_profile if it doesn't exist..."
Exec "$Bash" '-lc' "[ -e ~/.bash_profile ] || echo -e '# generated by ghcup\ntest -f ~/.profile && . ~/.profile\ntest -f ~/.bashrc && . ~/.bashrc' > ~/.bash_profile"
} elseif ($msys2Decision -eq 1) {
Print-Msg -color Yellow -msg 'Skipping MSys2 installation.'
while ($true) {