Skip to content

Instantly share code, notes, and snippets.

@Kristinita
Created March 24, 2017 09:37
Show Gist options
  • Save Kristinita/6c14fa1c2570ef284b0c0a448ca6fae8 to your computer and use it in GitHub Desktop.
Save Kristinita/6c14fa1c2570ef284b0c0a448ca6fae8 to your computer and use it in GitHub Desktop.
choco-zip
<snippet>
<content><![CDATA[
\$ErrorActionPreference = 'Stop';
# Insert here full correct name of program, not Chocolatey package name. For example, correct «Performance Maintainer», not «pername».
\$packageName = '${1:Paste or print here correct package name}'
\$toolsDir = "\$(Split-Path -parent \$MyInvocation.MyCommand.Definition)"
# Don't forget specify protocol for URL's!
\$url = '${2:Paste here correct download URL}'
\$url64 = '${3:Paste here correct download URL for 64-bit Windows. If for 32-bit and 64-bit Windows have one installation file, do not write anything here}'
\$packageArgs = @{
packageName = \$packageName
unzipLocation = \$toolsDir
url = \$url
url64bit = \$url64
checksum = '${4:Paste here correct SHA256 checksum for zip file}'
checksumType = 'sha256'
checksum64 = '${5:Paste here correct SHA256 checksum for 64-bit zip file. If for 32-bit and 64-bit Windows you have one installation file, paste here same checksum like in «checksum» section}'
checksumType64 = 'sha256'
}
Install-ChocolateyZipPackage @packageArgs
]]></content>
<tabTrigger>choco-zip</tabTrigger>
<scope>source.powershell</scope>
<description>Chocolatey script for zip archives installation</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment