2023-07-19 12:33:06 +00:00
|
|
|
#!/bin/pwsh
|
|
|
|
powershell -c 'New-Item -Force $PROFILE';
|
2023-07-19 14:07:58 +00:00
|
|
|
choco install -y --force chocolatey;
|
2023-07-19 12:33:06 +00:00
|
|
|
Copy-Item -Force (powershell -c '$PROFILE') $PROFILE;
|
|
|
|
|
|
|
|
Push-Location ~;
|
|
|
|
|
|
|
|
$files = @((powershell -c '$PROFILE'), $PROFILE) | ForEach-Object { Resolve-Path -Relative $_ };
|
|
|
|
|
|
|
|
foreach ($profileFile in $files) {
|
2023-07-19 14:19:25 +00:00
|
|
|
$fullName = "C:/Users/Default/$profileFile";
|
|
|
|
$dirName = Split-Path -Parent $fullName;
|
|
|
|
|
|
|
|
if (-not (Test-Path -PathType Container $dirName)) {
|
2023-07-19 21:19:05 +00:00
|
|
|
$null = New-Item -Force -ItemType Directory $dirName;
|
2023-07-19 14:19:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Copy-Item -Force "~/$profileFile" $fullName;
|
2023-07-19 12:33:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Pop-Location;
|
|
|
|
|
|
|
|
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1";
|