Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ScoopInstaller/Scoop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c86ed9344402c00094cb996b8b6a8867ef444956
Choose a base ref
..
head repository: ScoopInstaller/Scoop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b4218791c75c8e0f303cde1687ebeeb2cde307ee
Choose a head ref
6 changes: 3 additions & 3 deletions bucket/aws.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"version": "1.16.111",
"version": "1.16.112",
"license": "Apache-2.0",
"homepage": "https://aws.amazon.com/cli/",
"description": "The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.",
"url": "https://s3.amazonaws.com/aws-cli/AWSCLI64PY3-1.16.111.msi",
"hash": "7e40ae31707d2aa627574834b3eb2113a86b6e6a2c2659a4886e4e9830a56a4f",
"url": "https://s3.amazonaws.com/aws-cli/AWSCLI64PY3-1.16.112.msi",
"hash": "01796402f29a672d626d8cb38891fccbfaf8bd0d2b1145e59f365e402d8b013a",
"extract_dir": "Amazon/AWSCLI",
"bin": [
[
14 changes: 7 additions & 7 deletions bucket/ffmpeg-nightly.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"version": "20190223-fc32e08",
"version": "20190225-2e67f75",
"homepage": "https://ffmpeg.zeranoe.com/builds/",
"license": "GPL-3.0",
"architecture": {
"64bit": {
"url": "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20190223-fc32e08-win64-static.zip",
"hash": "bb50f7611b097b79eca4e994b889b319a79fb85e8b1e9362361fe60dc78f2bab",
"extract_dir": "ffmpeg-20190223-fc32e08-win64-static"
"url": "https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20190225-2e67f75-win64-static.zip",
"hash": "bb86c3db6134dd866fad9af3dfc1769cedf7526dd8d2ce2dbc537c9f7c1fd522",
"extract_dir": "ffmpeg-20190225-2e67f75-win64-static"
},
"32bit": {
"url": "https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20190223-fc32e08-win32-static.zip",
"hash": "1c646459de54b4696e18c9e5f26f4725a9e1bbb222c332b96da5bd6ed54cd800",
"extract_dir": "ffmpeg-20190223-fc32e08-win32-static"
"url": "https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20190225-2e67f75-win32-static.zip",
"hash": "e78fcd16a8208fb0e757cb3167040aea5a87692671925f3e8a7779513f415176",
"extract_dir": "ffmpeg-20190225-2e67f75-win32-static"
}
},
"bin": [
10 changes: 5 additions & 5 deletions bucket/go.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.11.5",
"version": "1.12",
"homepage": "https://golang.org",
"license": "BSD-3-Clause",
"extract_dir": "go",
@@ -19,12 +19,12 @@
},
"architecture": {
"64bit": {
"url": "https://storage.googleapis.com/golang/go1.11.5.windows-amd64.zip",
"hash": "1c734fe614fa052f44694e993f2d06f24a56b6703ee46fdfb2b9bf277819fe40"
"url": "https://storage.googleapis.com/golang/go1.12.windows-amd64.zip",
"hash": "880ced1aecef08b3471a84381b6c7e2c0e846b81dd97ecb629b534d941f282bd"
},
"32bit": {
"url": "https://storage.googleapis.com/golang/go1.11.5.windows-386.zip",
"hash": "b569f7a45056ab810364d7ac9ee6357e9a098fc3e4c75e016948736fa93ee229"
"url": "https://storage.googleapis.com/golang/go1.12.windows-386.zip",
"hash": "c6606bfdc4d8b080fc40f72a072eb380ead77a02a4f99a6b953df6d9c7029970"
}
},
"checkver": "Build version go([\\d\\.]+)\\.",
6 changes: 3 additions & 3 deletions bucket/hygen.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"description": "The scalable code generator that saves you time",
"homepage": "https://www.hygen.io/",
"version": "2.1.2",
"url": "https://github.com/jondot/hygen/releases/download/v2.1.2/hygen.win.exe.v2.1.2.zip",
"hash": "f2ebb24f3b7d2d83c7e077482f35d7761dbb83602b4722114a484317251b5ebd",
"version": "3.0.0",
"url": "https://github.com/jondot/hygen/releases/download/v3.0.0/hygen.win.exe.v3.0.0.zip",
"hash": "4c09a30f0b197f561d83fe0eeef13ec475265de54b08d49d2e3c5ae74ffebd05",
"bin": "hygen.exe",
"checkver": {
"github": "https://github.com/jondot/hygen"
6 changes: 3 additions & 3 deletions bucket/jx.json
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
"homepage": "https://github.com/jenkins-x/jx",
"description": "A command line tool for installing and using Jenkins X",
"license": "Apache-2.0",
"version": "1.3.925",
"version": "1.3.929",
"architecture": {
"64bit": {
"url": "https://github.com/jenkins-x/jx/releases/download/v1.3.925/jx-windows-amd64.zip",
"hash": "914b243f869236ab5a0db5c2e1790cd674fb066d5c6992c3f111956992d6d936"
"url": "https://github.com/jenkins-x/jx/releases/download/v1.3.929/jx-windows-amd64.zip",
"hash": "f935ee7984966fe892f51d15bcbf253c23f8a660e68a53d78f64a6b99f49b9b8"
}
},
"bin": [
6 changes: 3 additions & 3 deletions bucket/kustomize.json
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
"homepage": "https://github.com/kubernetes-sigs/kustomize",
"description": "Customize raw, template-free YAML files for multiple purposes, leaving the original YAML untouched and usable as is.",
"license": "Apache-2.0",
"version": "2.0.1",
"version": "2.0.2",
"architecture": {
"64bit": {
"url": "https://github.com/kubernetes-sigs/kustomize/releases/download/v2.0.1/kustomize_2.0.1_windows_amd64.exe#/kustomize.exe",
"hash": "c0ce46c0c81bb7ee4b13128a3152e17b73fde586057ae8c85eddfa3134d28371"
"url": "https://github.com/kubernetes-sigs/kustomize/releases/download/v2.0.2/kustomize_2.0.2_windows_amd64.exe#/kustomize.exe",
"hash": "84fc39886f4b25a01a84c675f4ed52feb0405062879554e7289169035d1f73c0"
}
},
"bin": "kustomize.exe",
14 changes: 7 additions & 7 deletions bucket/octave.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"homepage": "https://www.gnu.org/software/octave/",
"version": "4.4.1",
"version": "5.1.0",
"license": "GPL-3.0-only",
"architecture": {
"64bit": {
"url": "https://ftp.gnu.org/gnu/octave/windows/octave-4.4.1-w64.zip",
"hash": "69482931038a63fa258a58e23c4745015cbf0a6283dec92dfd866d8dfb7807c0",
"extract_dir": "octave-4.4.1-w64"
"url": "https://ftp.gnu.org/gnu/octave/windows/octave-5.1.0-w64.zip",
"hash": "05ba8de71b17ddf6c9f36bbba4e92a1344e3b505a15f1a5a2bd70021feecab93",
"extract_dir": "octave-5.1.0-w64"
},
"32bit": {
"url": "https://ftp.gnu.org/gnu/octave/windows/octave-4.4.1-w32.zip",
"hash": "e2fe876c72feb396af2ff4c4a7a893cbd802634ac1f6cadd05f29fb8d4bf26e2",
"extract_dir": "octave-4.4.1-w32"
"url": "https://ftp.gnu.org/gnu/octave/windows/octave-5.1.0-w32.zip",
"hash": "949d5b174410cfdcf60e543742adf4d9e206ae93a4face4b0258f16b7d081f63",
"extract_dir": "octave-5.1.0-w32"
}
},
"bin": [
6 changes: 3 additions & 3 deletions bucket/purescript.json
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
"homepage": "http://purescript.org/",
"description": "A strongly-typed language that compiles to Javascript",
"license": "MIT",
"version": "0.12.2",
"version": "0.12.3",
"architecture": {
"64bit": {
"url": "https://github.com/purescript/purescript/releases/download/v0.12.2/win64.tar.gz",
"hash": "sha1:d6d02c80f241e8c33232e23e2f51cc53b1d06649"
"url": "https://github.com/purescript/purescript/releases/download/v0.12.3/win64.tar.gz",
"hash": "sha1:fb424079e63fb134647366ff594fef6fbff11553"
}
},
"bin": "purs.exe",
8 changes: 4 additions & 4 deletions bucket/sqlite.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"homepage": "https://www.sqlite.org/",
"version": "3.27.1",
"version": "3.27.2",
"license": "Public Domain",
"url": "https://www.sqlite.org/2019/sqlite-tools-win32-x86-3270100.zip",
"hash": "d0c0929e51682c28cd81247d6c894543bb8aaf441b0a6546d7f29b6aa38045e9",
"extract_dir": "sqlite-tools-win32-x86-3270100",
"url": "https://www.sqlite.org/2019/sqlite-tools-win32-x86-3270200.zip",
"hash": "753b16d7569de9416ad32919ff5063baf2cb2a20ccdd0e168ca7ff02e7d189ed",
"extract_dir": "sqlite-tools-win32-x86-3270200",
"bin": [
"sqlite3.exe",
"sqldiff.exe",
6 changes: 3 additions & 3 deletions bucket/vim.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"homepage": "http://www.vim.org",
"license": "Vim",
"version": "8.1.0978",
"version": "8.1.0982",
"architecture": {
"64bit": {
"url": "https://github.com/vim/vim-win32-installer/releases/download/v8.1.0978/gvim_8.1.0978_x64.zip",
"hash": "5d11910f401118310bc2274964f2a7f7af7c2cd9136edd6604f56c3fd4b3d0d4"
"url": "https://github.com/vim/vim-win32-installer/releases/download/v8.1.0982/gvim_8.1.0982_x64.zip",
"hash": "2cbe127439c695e7cea3fe3fe783e51d1339e82fdbfda378af79fb98a2102303"
}
},
"extract_dir": "vim\\vim81",
6 changes: 3 additions & 3 deletions bucket/wyam.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"homepage": "https://wyam.io",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",
"url": "https://github.com/Wyamio/Wyam/releases/download/v2.2.0/Wyam-v2.2.0.zip",
"hash": "4f428c246a70631ecba5bd2910c3296e952e176aac501211794de2e51a3f23a1",
"url": "https://github.com/Wyamio/Wyam/releases/download/v2.2.1/Wyam-v2.2.1.zip",
"hash": "d9275b06e160ea673713a98262e2f49f34313f25d3bad70e8acf52c1e0bc2985",
"bin": "wyam.exe",
"checkver": {
"github": "https://github.com/Wyamio/Wyam"
70 changes: 42 additions & 28 deletions lib/decompress.ps1
Original file line number Diff line number Diff line change
@@ -1,60 +1,75 @@
function requires_7zip($manifest, $architecture) {
foreach ($dlurl in @(url $manifest $architecture)) {
if (file_requires_7zip $dlurl) { return $true }
foreach($dlurl in @(url $manifest $architecture)) {
if(file_requires_7zip $dlurl) { return $true }
}
}

function requires_lessmsi ($manifest, $architecture) {
$useLessMsi = get_config MSIEXTRACT_USE_LESSMSI
if (!$useLessMsi) { return $false }

$(url $manifest $architecture | Where-Object {
$_ -match '\.(msi)$'
} | Measure-Object | Select-Object -exp count) -gt 0
$_ -match '\.(msi)$'
} | Measure-Object | Select-Object -exp count) -gt 0
}

function file_requires_7zip($fname) {
$fname -match '\.((gz)|(tar)|(tgz)|(lzma)|(bz)|(bz2)|(7z)|(rar)|(iso)|(xz)|(lzh)|(nupkg))$'
}

function extract_7zip($path, $to, $recurse) {
$output = &(file_path 7zip 7z.exe) x "$path" -o"$to" -y
if ($lastexitcode -ne 0) { abort "Exit code was $lastexitcode." }
$output = 7z x "$path" -o"$to" -y
if($lastexitcode -ne 0) { abort "Exit code was $lastexitcode." }

# check for tar
$tar = (split-path $path -leaf) -replace '\.[^\.]*$', ''
if ($tar -match '\.tar$') {
if (test-path "$to\$tar") { extract_7zip "$to\$tar" $to $true }
if($tar -match '\.tar$') {
if(test-path "$to\$tar") { extract_7zip "$to\$tar" $to $true }
}

if ($recurse) { Remove-Item $path -Force } # clean up intermediate files
if($recurse) { Remove-Item $path } # clean up intermediate files
}

function extract_msi($path, $to, $recurse) {
function unpack_inno($fname, $manifest, $dir) {
if(!$manifest.innosetup) { return }

write-host "Unpacking innosetup... " -nonewline
innounp -x -d"$dir\_scoop_unpack" "$dir\$fname" > "$dir\innounp.log"
if($lastexitcode -ne 0) {
abort "Failed to unpack innosetup file. See $dir\innounp.log"
}

Get-ChildItem "$dir\_scoop_unpack\{app}" -r | Move-Item -dest "$dir" -force

Remove-Item -r -force "$dir\_scoop_unpack"

Remove-Item "$dir\$fname"
Write-Host "done." -f Green
}

function extract_msi($path, $to) {
$logfile = "$(split-path $path)\msi.log"
$ok = run 'msiexec' @('/a', "`"$path`"", '/qn', "TARGETDIR=`"$to`"", "/lwe `"$logfile`"")
if (!$ok) { abort "Failed to extract files from $path.`nLog file:`n $(friendly_path $logfile)" }
if (test-path $logfile) { Remove-Item $logfile }
if ($recurse) { Remove-Item $path -Force }
if(!$ok) { abort "Failed to extract files from $path.`nLog file:`n $(friendly_path $logfile)" }
if(test-path $logfile) { Remove-Item $logfile }
}

function extract_lessmsi($path, $to, $recurse) {
&(file_path lessmsi lessmsi.exe) x "$path" "$to\"
Move-Item "$to\SourceDir\*" "$to" -Force
Remove-Item "$to\SourceDir" -Force
if ($recurse) { Remove-Item $path -Force }
function lessmsi_config ($extract_dir) {
$extract_fn = 'extract_lessmsi'
if ($extract_dir) {
$extract_dir = join-path SourceDir $extract_dir
} else {
$extract_dir = "SourceDir"
}

$extract_fn, $extract_dir
}

function extract_inno($path, $to, $recurse) {
$logfile = "$(split-path $path)\innounp.log"
&(file_path innounp innounp.exe) -x -d"$to" -c"{app}" "$path" > "$logfile"
if ($lastexitcode -ne 0) {
abort "Failed to extract files from $path.`nLog file:`n $(friendly_path $logfile)"
}
if (test-path $logfile) { Remove-Item $logfile }
if ($recurse) { Remove-Item $path -Force }
function extract_lessmsi($path, $to) {
Invoke-Expression "lessmsi x `"$path`" `"$to\`""
}

function extract_zip($path, $to, $recurse) {
function extract_zip($path, $to) {
if (!(test-path $path)) { abort "can't find $path to unzip"}
try { add-type -assembly "System.IO.Compression.FileSystem" -ea stop }
catch { unzip_old $path $to; return } # for .net earlier than 4.5
@@ -97,7 +112,6 @@ function extract_zip($path, $to, $recurse) {
} catch {
abort "Unzip failed: $_"
}
if ($recurse) { Remove-Item $path -Force }
}

function unzip_old($path, $to) {
4 changes: 3 additions & 1 deletion lib/depends.ps1
Original file line number Diff line number Diff line change
@@ -52,7 +52,9 @@ function runtime_deps($manifest) {
function install_deps($manifest, $arch) {
$deps = @()

if(requires_7zip $manifest $arch) { $deps += '7zip' }
if((requires_7zip $manifest $arch) -and !(7zip_installed)) {
$deps += '7zip'
}
if(requires_lessmsi $manifest $arch) { $deps += 'lessmsi' }
if($manifest.innosetup) { $deps += 'innounp' }

10 changes: 5 additions & 5 deletions lib/install.ps1
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@ function install_app($app, $architecture, $global, $suggested, $use_cache = $tru
$persist_dir = persistdir $app $global

$fname = dl_urls $app $version $manifest $bucket $architecture $dir $use_cache $check_hash
unpack_inno $fname $manifest $dir
pre_install $manifest $architecture
run_installer $fname $manifest $architecture $dir $global
ensure_install_dir_not_in_path $dir $global
@@ -528,17 +529,15 @@ function dl_urls($app, $version, $manifest, $bucket, $architecture, $dir, $use_c

# work out extraction method, if applicable
$extract_fn = $null
if ($manifest.innosetup) {
$extract_fn = 'extract_inno'
} elseif($fname -match '\.zip$') {
if($fname -match '\.zip$') {
$extract_fn = 'extract_zip'
} elseif($fname -match '\.msi$') {
# check manifest doesn't use deprecated install method
$msi = msi $manifest $architecture
if(!$msi) {
$useLessMsi = get_config MSIEXTRACT_USE_LESSMSI
if ($useLessMsi -eq $true) {
$extract_fn = 'extract_lessmsi'
$extract_fn, $extract_dir = lessmsi_config $extract_dir
}
else {
$extract_fn = 'extract_msi'
@@ -559,7 +558,8 @@ function dl_urls($app, $version, $manifest, $bucket, $architecture, $dir, $use_c
Write-Host $fname -f Cyan -NoNewline
Write-Host " ... " -NoNewline
$null = mkdir "$dir\_tmp"
& $extract_fn "$dir\$fname" "$dir\_tmp" $true
& $extract_fn "$dir\$fname" "$dir\_tmp"
Remove-Item "$dir\$fname"
if ($extract_to) {
$null = mkdir "$dir\$extract_to" -force
}
Loading