mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-26 11:21:46 +00:00
copying easy configuration files
This commit is contained in:
parent
e6e8a3212d
commit
a1699e940c
@ -41,4 +41,34 @@ if (IsInDotfilesRepo -currentDir $currentDir)
|
||||
git -C $dotfilesRepo pull
|
||||
}
|
||||
}
|
||||
|
||||
# Function to copy files with overwrite prompt
|
||||
function CopyFileWithPrompt
|
||||
{
|
||||
param (
|
||||
[string]$source,
|
||||
[string]$destination
|
||||
)
|
||||
|
||||
if (Test-Path $destination)
|
||||
{
|
||||
$overwrite = Read-Host "File $destination exists. Overwrite? (y/n)"
|
||||
if ($overwrite -ne 'y')
|
||||
{
|
||||
Write-Host "Skipping $destination" -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
}
|
||||
Copy-Item -Path $source -Destination $destination -Force
|
||||
}
|
||||
}
|
||||
|
||||
# Copy the main Alacritty configuration file
|
||||
CopyFileWithPrompt "$dotfilesRepo\alacritty\alacritty.toml" "$alacrittyConfigDir\alacritty.toml"
|
||||
|
||||
# Setting up PowerShell Profile
|
||||
Write-Host "Setting up PowerShell profile..." -ForegroundColor Cyan
|
||||
CopyFileWithPrompt "$dotfilesRepo\PowerShell\Microsoft.PowerShell_profile.ps1" $psProfile
|
||||
|
||||
# Final message
|
||||
Write-Host "Windows setup complete!" -ForegroundColor Green
|
||||
|
Loading…
Reference in New Issue
Block a user