Permalink
Browse files

adding chocolatey

  • Loading branch information...
ferventcoder committed Mar 21, 2011
1 parent 1a5fee1 commit d16ed7ac675395b3bb8ecee90fb13efb03d4b619
Showing with 74 additions and 0 deletions.
  1. +18 −0 chocolatey/chocolatey.nuspec
  2. +14 −0 chocolatey/content/Chocolatey.ReadMe.txt
  3. +42 −0 chocolatey/tools/install.ps1
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata>
<id>chocolatey</id>
<title>Chocolatey</title>
<version>0.5.0.0</version>
<authors>Rob Reynolds</authors>
<owners>Rob Reynolds</owners>
<summary>Chocolatey is for machine level packages, like application nuggets.</summary>
<description>Chocolatey is for machine level packages, like application nuggets.
You would create a package and install it to C:\NuGet\lib\yourpackagename and also a bat file in
C:\NuGet\bin to point to your executable. Once the batch file is there, your executable will run from the command line.</description>
<projectUrl>https://github.com/ferventcoder/nugetpackages</projectUrl>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<tags>maven machine repository nuget</tags>
</metadata>
</package>
@@ -0,0 +1,14 @@
WarmuP
==========
WarmuP has been installed to C:\NuGet\lib\warmup. The path to C:\Nuget\bin has been added to your PATH environment variable.
Uninstalling will only remove the local reference to this repository.
Next Steps
==========
Please edit the configuration located at C:\NuGet\lib\warmup.
Usage
==========
You should now be able to execute warmup nameOfSubDirectory replacementName.
Please see http://devlicious.com/blogs/rob_reynolds/archive/2010/02/01/warmup-getting-started.aspx & http://codebetter.com/drusellers/2009/09/26/warmup for more information.
@@ -0,0 +1,42 @@
param($installPath, $toolsPath, $package, $project)
#========================
#Chocolatey - NuGet local machine repo
#========================
#chocolatey
#set up variables to add
$statementTerminator = ";"
$nugetPath = "C:\NuGet"
$nugetExePath = [System.IO.Path]::Combine($nuGetPath, "bin")
$nugetLibPath = [System.IO.Path]::Combine($nuGetPath, "lib")
$nugetYourPkgPath = [System.IO.Path]::Combine($nugetLibPath,"yourPackageName")
Write-Host We are setting up the Chocolatey repository for NuGet packages that should be at the machine level
Write-Host The repository is set up at $nugetPath.
Write-Host The packages themselves go to $nugetLibPath '(i.e.' $nugetYourPkgPath ').'
Write-Host A batch file for the command line goes to $nugetExePath and points to an executable in $nugetYourPkgPath.
#create the base structure if it doesn't exist
if (![System.IO.Directory]::Exists($nugetExePath)) {[System.IO.Directory]::CreateDirectory($nugetExePath)}
if (![System.IO.Directory]::Exists($nugetLibPath)) {[System.IO.Directory]::CreateDirectory($nugetLibPath)}
#get the PATH variable
$envPath = $env:PATH
#if you do not find C:\NuGet\bin, add it
if ($envPath.ToLower().Contains($nugetExePath.ToLower()))
{
#does the path end in ';'?
$hasStatementTerminator= $envPath.EndsWith($statementTerminator)
# if the last digit is not ;, then we are adding it
If (!$hasStatementTerminator) {$nugetExePath = $statementTerminator + $nugetExePath}
#now we update the path
$envPath = $envPath + $nugetExePath + $statementTerminator
[Environment]::SetEnvironmentVariable( "Path", $envPath, [System.EnvironmentVariableTarget]::Machine )
}
#========================
write-host Removing this package...
#uninstall-package $package.Name -ProjectName $project.Name
uninstall-package chocolatey -ProjectName $project.Name

1 comment on commit d16ed7a

@ferventcoder

This comment has been minimized.

Show comment
Hide comment
@ferventcoder

ferventcoder Mar 21, 2018

Owner

Chocolatey's first commit! Exact time was Mon Mar 21 17:33:53 2011 -0500

Owner

ferventcoder commented on d16ed7a Mar 21, 2018

Chocolatey's first commit! Exact time was Mon Mar 21 17:33:53 2011 -0500

Please sign in to comment.