cloning or pulling dotfiles repository

This commit is contained in:
Baipyrus 2024-08-27 12:33:44 +02:00
parent aeb224ef52
commit e2797da0b7

View File

@ -3,3 +3,14 @@ $dotfilesRepo = "$env:TMP\dotfiles"
$alacrittyConfigDir = "$env:APPDATA\alacritty" $alacrittyConfigDir = "$env:APPDATA\alacritty"
$psProfile = "$env:USERPROFILE\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" $psProfile = "$env:USERPROFILE\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"
$repoUrl = "https://github.com/Baipyrus/dotfiles.git" $repoUrl = "https://github.com/Baipyrus/dotfiles.git"
# Clone dotfiles repository to TMP if not already inside it
if (-not (Test-Path $dotfilesRepo))
{
Write-Host "Cloning dotfiles repository..." -ForegroundColor Cyan
git clone $repoUrl $dotfilesRepo
} else
{
Write-Host "Pulling latest changes from dotfiles repository..." -ForegroundColor Cyan
git -C $dotfilesRepo pull
}