[WINDOWS] Autoconfig WSL
This commit is contained in:
parent
612579bb34
commit
5fb93a3d3e
3 changed files with 13 additions and 1 deletions
14
install.ps1
14
install.ps1
|
@ -48,4 +48,16 @@ Set-PSReadLineOption @PSReadLineOptions
|
||||||
'@ | Out-File -FilePath $PROFILE -Append
|
'@ | Out-File -FilePath $PROFILE -Append
|
||||||
|
|
||||||
# Reload profile
|
# Reload profile
|
||||||
. $PROFILE
|
. $PROFILE
|
||||||
|
|
||||||
|
# Configure WSL
|
||||||
|
Get-Command wsl
|
||||||
|
if ($? -eq $True) {
|
||||||
|
$linuxWindowsConfPath = (Get-Location).Path.Replace('C:', '/mnt/c').Replace('\', '/')
|
||||||
|
$linuxHomeConfPath = "/home/$(wsl -e 'whoami')/myconf"
|
||||||
|
|
||||||
|
bash -c "ln -s $linuxWindowsConfPath $linuxHomeConfPath"
|
||||||
|
bash -c "$linuxHomeConfPath/install.sh"
|
||||||
|
} else {
|
||||||
|
Write-Output 'WSL is not installed. Ignore...'
|
||||||
|
}
|
Loading…
Reference in a new issue