mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-25 19:01:45 +00:00
using push/pop location instead to accommodate for powershell v5
This commit is contained in:
parent
8c6dcd4590
commit
eaf1e8e9f3
@ -94,6 +94,7 @@ function ProcessUrlFiles
|
|||||||
if (-not (Test-Path $tmpApp))
|
if (-not (Test-Path $tmpApp))
|
||||||
{ New-Item -ItemType Directory -Path $tmpApp | Out-Null
|
{ New-Item -ItemType Directory -Path $tmpApp | Out-Null
|
||||||
}
|
}
|
||||||
|
Push-Location
|
||||||
Set-Location $tmpApp
|
Set-Location $tmpApp
|
||||||
|
|
||||||
# Find all .url files in the source directory
|
# Find all .url files in the source directory
|
||||||
@ -150,7 +151,7 @@ function ProcessUrlFiles
|
|||||||
Write-Host "Cloning $fileName from $url to $destinationPath..." -ForegroundColor Cyan
|
Write-Host "Cloning $fileName from $url to $destinationPath..." -ForegroundColor Cyan
|
||||||
git clone $url $destinationPath
|
git clone $url $destinationPath
|
||||||
}
|
}
|
||||||
Set-Location -
|
Pop-Location
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to expand zip archives and copy to destination paths
|
# Function to expand zip archives and copy to destination paths
|
||||||
|
@ -45,8 +45,10 @@ function InstallWSLNeovim
|
|||||||
Import-Module ./windows.psm1
|
Import-Module ./windows.psm1
|
||||||
|
|
||||||
ProcessUrlFiles -sourceDir $source
|
ProcessUrlFiles -sourceDir $source
|
||||||
|
|
||||||
|
Push-Location
|
||||||
Set-Location "$env:TMP\nvim-config"
|
Set-Location "$env:TMP\nvim-config"
|
||||||
Write-Host "Copying (forcably) configuration to WSL..." -ForegroundColor Yellow
|
Write-Host "Copying (forcably) configuration to WSL..." -ForegroundColor Yellow
|
||||||
wsl.exe cp -rf . ~/.config/ 2>$null | Out-Null
|
wsl.exe cp -rf . ~/.config/ 2>$null | Out-Null
|
||||||
Set-Location -
|
Pop-Location
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user