From 16b0117603f0deacdc8d521395bd771972a8821c Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Sun, 27 Sep 2020 15:22:31 +0200 Subject: [PATCH] Use 'Get-ToolsLocation' to determine prefix --- chocolateyInstall.ps1 | 10 +++++----- chocolateyUninstall.ps1 | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chocolateyInstall.ps1 b/chocolateyInstall.ps1 index 6f929c6..9f0d715 100644 --- a/chocolateyInstall.ps1 +++ b/chocolateyInstall.ps1 @@ -1,8 +1,8 @@ C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacman -S --needed --noconfirm pactoys' C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacboy -Sy --needed --noconfirm binutils:x make:x gcc:x gettext:x readline:x' -New-Item C:\tools -ItemType Directory -Move-Item $env:chocolateyPackageFolder\tools C:\tools\chicken -Force -Install-ChocolateyEnvironmentVariable -VariableName "CHICKEN_PREFIX" -VariableValue "C:\tools\chicken" -VariableType Machine -Install-ChocolateyPath -PathToInstall "C:\tools\chicken\bin" -PathType Machine -Install-ChocolateyPath -PathToInstall "C:\tools\msys64\mingw64\bin" -PathType Machine +New-Item $(Get-ToolsLocation) -ItemType Directory +Move-Item $env:chocolateyPackageFolder\tools $(Get-ToolsLocation)\chicken -Force +Install-ChocolateyEnvironmentVariable -VariableName "CHICKEN_PREFIX" -VariableValue "$(Get-ToolsLocation)\chicken" -VariableType Machine +Install-ChocolateyPath -PathToInstall "$(Get-ToolsLocation)\chicken\bin" -PathType Machine +Install-ChocolateyPath -PathToInstall "$(Get-ToolsLocation)\msys64\mingw64\bin" -PathType Machine Update-SessionEnvironment diff --git a/chocolateyUninstall.ps1 b/chocolateyUninstall.ps1 index 70cda8f..5ec8628 100644 --- a/chocolateyUninstall.ps1 +++ b/chocolateyUninstall.ps1 @@ -1,3 +1,3 @@ -Remove-Item -Recurse -Force "C:\tools\chicken" +Remove-Item -Recurse -Force "$(Get-ToolsLocation)\chicken" Uninstall-ChocolateyEnvironmentVariable -VariableName "CHICKEN_PREFIX" -VariableType Machine Update-SessionEnvironment