diff --git a/bucket/microsoft-coreutils.json b/bucket/microsoft-coreutils.json index 9aa6ff2d50737..38301b465f921 100644 --- a/bucket/microsoft-coreutils.json +++ b/bucket/microsoft-coreutils.json @@ -3,7 +3,6 @@ "description": "A Microsoft-maintained build of uutils/coreutils, uutils/findutils.", "homepage": "https://github.com/microsoft/coreutils", "license": "MIT", - "innosetup": true, "architecture": { "64bit": { "url": "https://github.com/microsoft/coreutils/releases/download/v2026.6.16/coreutils-2026.6.16-x64.exe", @@ -16,396 +15,366 @@ }, "bin": [ "coreutils.exe", + [ + "bin/coreutils-manager.exe", + "coreutils-manager" + ], [ "coreutils.exe", "uutils" ], [ - "coreutils.exe", - "arch", + "bin/arch.exe", "arch" ], [ - "coreutils.exe", - "b2sum", + "bin/b2sum.exe", "b2sum" ], [ - "coreutils.exe", - "base32", + "bin/base32.exe", "base32" ], [ - "coreutils.exe", - "base64", + "bin/base64.exe", "base64" ], [ - "coreutils.exe", - "basename", + "bin/basename.exe", "basename" ], [ - "coreutils.exe", - "basenc", + "bin/basenc.exe", "basenc" ], [ - "coreutils.exe", - "cat", + "bin/cat.exe", "cat" ], [ - "coreutils.exe", - "cksum", + "bin/cksum.exe", "cksum" ], [ - "coreutils.exe", - "comm", + "bin/comm.exe", "comm" ], [ - "coreutils.exe", - "cp", + "bin/cp.exe", "cp" ], [ - "coreutils.exe", - "csplit", + "bin/csplit.exe", "csplit" ], [ - "coreutils.exe", - "cut", + "bin/cut.exe", "cut" ], [ - "coreutils.exe", - "date", + "bin/date.exe", "date" ], [ - "coreutils.exe", - "df", + "bin/df.exe", "df" ], [ - "coreutils.exe", - "dirname", + "bin/dirname.exe", "dirname" ], [ - "coreutils.exe", - "du", + "bin/du.exe", "du" ], [ - "coreutils.exe", - "echo", + "bin/echo.exe", "echo" ], [ - "coreutils.exe", - "env", + "bin/env.exe", "env" ], [ - "coreutils.exe", - "expr", + "bin/expr.exe", "expr" ], [ - "coreutils.exe", - "factor", + "bin/factor.exe", "factor" ], [ - "coreutils.exe", - "false", + "bin/false.exe", "false" ], [ - "coreutils.exe", - "find", + "bin/find.exe", "find" ], [ - "coreutils.exe", - "fmt", + "bin/fmt.exe", "fmt" ], [ - "coreutils.exe", - "fold", + "bin/fold.exe", "fold" ], [ - "coreutils.exe", - "grep", + "bin/grep.exe", "grep" ], [ - "coreutils.exe", - "head", + "bin/head.exe", "head" ], [ - "coreutils.exe", - "hostname", + "bin/hostname.exe", "hostname" ], [ - "coreutils.exe", - "join", + "bin/join.exe", "join" ], [ - "coreutils.exe", - "link", + "bin/link.exe", "link" ], [ - "coreutils.exe", - "ln", + "bin/ln.exe", "ln" ], [ - "coreutils.exe", - "ls", + "bin/ls.exe", "ls" ], [ - "coreutils.exe", - "md5sum", + "bin/md5sum.exe", "md5sum" ], [ - "coreutils.exe", - "mkdir", + "bin/mkdir.exe", "mkdir" ], [ - "coreutils.exe", - "mktemp", + "bin/mktemp.exe", "mktemp" ], [ - "coreutils.exe", - "mv", + "bin/mv.exe", "mv" ], [ - "coreutils.exe", - "nl", + "bin/nl.exe", "nl" ], [ - "coreutils.exe", - "nproc", + "bin/nproc.exe", "nproc" ], [ - "coreutils.exe", - "numfmt", + "bin/numfmt.exe", "numfmt" ], [ - "coreutils.exe", - "od", + "bin/od.exe", "od" ], [ - "coreutils.exe", - "pathchk", + "bin/pathchk.exe", "pathchk" ], [ - "coreutils.exe", - "pr", + "bin/paste.exe", + "paste" + ], + [ + "bin/pr.exe", "pr" ], [ - "coreutils.exe", - "printenv", + "bin/printenv.exe", "printenv" ], [ - "coreutils.exe", - "printf", + "bin/printf.exe", "printf" ], [ - "coreutils.exe", - "ptx", + "bin/ptx.exe", "ptx" ], [ - "coreutils.exe", - "pwd", + "bin/pwd.exe", "pwd" ], [ - "coreutils.exe", - "readlink", + "bin/readlink.exe", "readlink" ], [ - "coreutils.exe", - "realpath", + "bin/realpath.exe", "realpath" ], [ - "coreutils.exe", - "rm", + "bin/rm.exe", "rm" ], [ - "coreutils.exe", - "rmdir", + "bin/rmdir.exe", "rmdir" ], [ - "coreutils.exe", - "seq", + "bin/seq.exe", "seq" ], [ - "coreutils.exe", - "sha1sum", + "bin/sha1sum.exe", "sha1sum" ], [ - "coreutils.exe", - "sha224sum", + "bin/sha224sum.exe", "sha224sum" ], [ - "coreutils.exe", - "sha256sum", + "bin/sha256sum.exe", "sha256sum" ], [ - "coreutils.exe", - "sha384sum", + "bin/sha384sum.exe", "sha384sum" ], [ - "coreutils.exe", - "sha512sum", + "bin/sha512sum.exe", "sha512sum" ], [ - "coreutils.exe", - "shuf", + "bin/shuf.exe", "shuf" ], [ - "coreutils.exe", - "sleep", + "bin/sleep.exe", "sleep" ], [ - "coreutils.exe", - "sort", + "bin/sort.exe", "sort" ], [ - "coreutils.exe", - "split", + "bin/split.exe", "split" ], [ - "coreutils.exe", - "stat", + "bin/stat.exe", "stat" ], [ - "coreutils.exe", - "sum", + "bin/sum.exe", "sum" ], [ - "coreutils.exe", - "tac", + "bin/tac.exe", "tac" ], [ - "coreutils.exe", - "tail", + "bin/tail.exe", "tail" ], [ - "coreutils.exe", - "tee", + "bin/tee.exe", "tee" ], [ - "coreutils.exe", - "test", + "bin/test.exe", "test" ], [ - "coreutils.exe", - "touch", + "bin/touch.exe", "touch" ], [ - "coreutils.exe", - "tr", + "bin/tr.exe", "tr" ], [ - "coreutils.exe", - "true", + "bin/true.exe", "true" ], [ - "coreutils.exe", - "truncate", + "bin/truncate.exe", "truncate" ], [ - "coreutils.exe", - "tsort", + "bin/tsort.exe", "tsort" ], [ - "coreutils.exe", - "unexpand", + "bin/unexpand.exe", "unexpand" ], [ - "coreutils.exe", - "uniq", + "bin/uniq.exe", "uniq" ], [ - "coreutils.exe", - "unlink", + "bin/unlink.exe", "unlink" ], [ - "coreutils.exe", - "uptime", + "bin/uptime.exe", "uptime" ], [ - "coreutils.exe", - "wc", + "bin/wc.exe", "wc" ], [ - "coreutils.exe", - "xargs", + "bin/xargs.exe", "xargs" ], [ - "coreutils.exe", - "yes", + "bin/yes.exe", "yes" ] ], + "innosetup": true, + "installer": { + "script": [ + "$binDir = Join-Path $dir 'bin'", + "$cmdDir = Join-Path $dir 'cmd'", + "New-Item -ItemType Directory -Force -Path $binDir, $cmdDir | Out-Null", + "$output = & (Join-Path $dir 'coreutils.exe') --list", + "if ($LASTEXITCODE -ne 0) { throw \"coreutils.exe --list failed with exit code $LASTEXITCODE\" }", + "$output | ForEach-Object {", + " $name = $_.Trim()", + " if ($name -ne '[') {", + " New-Item -ItemType HardLink -Force -Target (Join-Path $dir 'coreutils.exe') -Path (Join-Path $binDir \"$name.exe\") | Out-Null", + " New-Item -ItemType HardLink -Force -Target (Join-Path $dir 'coreutils.exe') -Path (Join-Path $cmdDir \"$name.cmd\") | Out-Null", + " }", + "}", + "Remove-Item -LiteralPath (Join-Path $binDir '_why_is_this_700MB_.txt'), (Join-Path $cmdDir '_why_is_this_700MB_.txt') -Force -ErrorAction Ignore", + "$pwshInstall = Join-Path $dir 'pwsh-install.ps1'", + "$pwshText = Get-Content -LiteralPath $pwshInstall -Raw", + "$pwshText = $pwshText.Replace('HKLM:\\SOFTWARE\\Microsoft\\coreutils\\PowerShellProfiles', 'HKCU:\\SOFTWARE\\Microsoft\\coreutils\\PowerShellProfiles')", + "[System.IO.File]::WriteAllText($pwshInstall, $pwshText, [System.Text.UTF8Encoding]::new($false))", + "$pwsh = Get-Command pwsh.exe -ErrorAction Ignore", + "if ($pwsh) {", + " $pwshVersion = & $pwsh.Source -NoProfile -NonInteractive -Command '$PSVersionTable.PSVersion.ToString()'", + " if ([version]$pwshVersion -ge [version]'7.4.0') {", + " & $pwsh.Source -NoProfile -NonInteractive -ExecutionPolicy Bypass -File $pwshInstall -Action Install -Scope CurrentUser -CmdDir $cmdDir", + " if ($LASTEXITCODE -ne 0) { throw \"pwsh-install.ps1 install failed with exit code $LASTEXITCODE\" }", + " }", + "}" + ] + }, + "uninstaller": { + "script": [ + "$pwshInstall = Join-Path $dir 'pwsh-install.ps1'", + "if (Get-Command pwsh.exe -ErrorAction Ignore) {", + " & pwsh.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File $pwshInstall -Action Uninstall", + " if ($LASTEXITCODE -ne 0) { throw \"pwsh-install.ps1 uninstall failed with exit code $LASTEXITCODE\" }", + "}" + ] + }, "checkver": "github", "autoupdate": { "architecture": {