From 45afef23017429503248286416cc6a673bbf1ddc Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 18 Jul 2023 17:49:54 +0200 Subject: [PATCH] Add scripts for setting up chocolatey --- scripts/Windows/Collections/Personal.ps1 | 2 ++ scripts/Windows/Software/chocolatey/Install.ps1 | 4 ++++ scripts/Windows/Software/chocolatey/profile.ps1 | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 scripts/Windows/Software/chocolatey/Install.ps1 create mode 100644 scripts/Windows/Software/chocolatey/profile.ps1 diff --git a/scripts/Windows/Collections/Personal.ps1 b/scripts/Windows/Collections/Personal.ps1 index 2e4150a6..77307190 100644 --- a/scripts/Windows/Collections/Personal.ps1 +++ b/scripts/Windows/Collections/Personal.ps1 @@ -33,6 +33,8 @@ function Restore-PersonalApps([Context] $context) { Install-PersonalDrivers $context; } + . "$PSScriptRoot/../Software/chocolatey/Install.ps1"; + # Backed up applications Restore-Git $context; Restore-LogitechGHUB $context; diff --git a/scripts/Windows/Software/chocolatey/Install.ps1 b/scripts/Windows/Software/chocolatey/Install.ps1 new file mode 100644 index 00000000..d3dd6800 --- /dev/null +++ b/scripts/Windows/Software/chocolatey/Install.ps1 @@ -0,0 +1,4 @@ +#!/bin/pwsh +. "$PSScriptRoot/profile.ps1"; +powershell "$PSScriptRoot/profile.ps1"; +Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"; diff --git a/scripts/Windows/Software/chocolatey/profile.ps1 b/scripts/Windows/Software/chocolatey/profile.ps1 new file mode 100644 index 00000000..c9af04c3 --- /dev/null +++ b/scripts/Windows/Software/chocolatey/profile.ps1 @@ -0,0 +1,6 @@ +#!/bin/pwsh +if (-not (Test-Path -PathType Leaf $PROFILE)) { + New-Item -Force $PROFILE; +} + +choco install --force chocolatey;