feat: Leiningen 2.2.0
- Automating Clojure projects without setting your hair on fire
This commit is contained in:
28
Leiningen/tools/chocolateyInstall.ps1
Normal file
28
Leiningen/tools/chocolateyInstall.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
$package = 'Leiningen'
|
||||
$version = '2.2.0'
|
||||
|
||||
try {
|
||||
$url = "https://raw.github.com/technomancy/leiningen/$version/bin/lein.bat"
|
||||
|
||||
$batDir = Join-Path $Env:ChocolateyInstall 'bin'
|
||||
$lein = Join-Path $batDir 'lein.bat'
|
||||
|
||||
Write-Host "Downloading from $url"
|
||||
|
||||
$client = New-Object Net.WebClient
|
||||
$client.DownloadFile($url, $lein)
|
||||
|
||||
Write-Host "Download from $url complete"
|
||||
|
||||
Write-Host "Executing bootstrap script from $batDir"
|
||||
|
||||
# $batDir is already in PATH
|
||||
lein self-install
|
||||
lein
|
||||
lein version
|
||||
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
22
Leiningen/tools/chocolateyUninstall.ps1
Normal file
22
Leiningen/tools/chocolateyUninstall.ps1
Normal file
@@ -0,0 +1,22 @@
|
||||
$package = 'Leiningen'
|
||||
$version = '2.2.0'
|
||||
|
||||
try {
|
||||
$installDir = Join-Path $Env:USERPROFILE '.lein'
|
||||
if (Test-Path $installDir)
|
||||
{
|
||||
Remove-Item $installDir -Recurse -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
$batDir = Join-Path $Env:ChocolateyInstall 'bin'
|
||||
$lein = Join-Path $batDir 'lein.bat'
|
||||
if (Test-Path $lein)
|
||||
{
|
||||
Remove-Item $lein -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
Write-ChocolateySuccess $package
|
||||
} catch {
|
||||
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
||||
throw
|
||||
}
|
Reference in New Issue
Block a user