Create .bash_profile on windows if it doesn't exist

This commit is contained in:
Julian Ospald 2021-08-31 22:53:39 +02:00
parent 375dba9dd1
commit 3897434ef0
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
1 changed files with 3 additions and 0 deletions

View File

@ -413,6 +413,9 @@ 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) {