From f1ca1776f838ddb60df91c418f2b615b876c3806 Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Tue, 14 Dec 2021 12:07:21 +0530 Subject: [PATCH] sed, grep: Use choco source (#3082) --- bucket/grep.json | 39 +++++++++++++++++++++++------------ bucket/sed.json | 53 ++++++++++++++++++++++++++++++++++++------------ 2 files changed, 66 insertions(+), 26 deletions(-) diff --git a/bucket/grep.json b/bucket/grep.json index c038449a0d..e7804dd00f 100644 --- a/bucket/grep.json +++ b/bucket/grep.json @@ -5,26 +5,39 @@ "license": "GPL-3.0-or-later", "architecture": { "64bit": { - "url": "https://nuwen.net/files/mingw/components-18.0.7z", - "hash": "50b7bddbceda793098f2fed3a249fb02911f4a46c5d9a2e6c77079fa7e40b2ad" + "url": "https://packages.chocolatey.org/grep.3.7.nupkg", + "hash": "ec113135322239cd453a290f48fdb1ce6190cdcde162aa8e576d41ff8c606c94", + "bin": [ + [ + "grep-3.7-x64.exe", + "grep" + ] + ], + "extract_dir": "tools\\install\\grep-windows-3.7" } }, - "extract_dir": "components-18.0", - "pre_install": [ - "Expand-7ZipArchive \"$dir\\grep-*.7z\" \"$dir\"", - "Get-ChildItem \"$dir\\*.7z\" | Remove-Item -Recurse -Force" - ], - "bin": "bin\\grep.exe", + "post_install": "Remove-Item \"$dir\\tools\" -Recurse", "checkver": { - "url": "https://nuwen.net/mingw.html", - "regex": "(?sm)>grep (?[\\d.]+).*?components-(?[\\d.]+).7z" + "url": "https://community.chocolatey.org/packages/grep", + "regex": "GNU grep ([\\d.]+)" }, "autoupdate": { "architecture": { "64bit": { - "url": "https://nuwen.net/files/mingw/components-$matchComponents.7z" + "url": "https://packages.chocolatey.org/grep.$version.nupkg", + "hash": { + "url": "https://community.chocolatey.org/packages/grep", + "regex": "$sha256.*?$basename" + }, + "bin": [ + [ + "grep-$version-x64.exe", + "grep" + ] + ], + "extract_dir": "tools\\install\\grep-windows-$version" } - }, - "extract_dir": "components-$matchComponents" + } } } + diff --git a/bucket/sed.json b/bucket/sed.json index f1b5653faa..7c5f12aef0 100644 --- a/bucket/sed.json +++ b/bucket/sed.json @@ -3,28 +3,55 @@ "description": "sed (stream editor) is a non-interactive command-line text editor", "homepage": "https://www.gnu.org/software/sed", "license": "GPL-3.0-or-later", + "url": "https://packages.chocolatey.org/sed.4.8.nupkg", + "hash": "ee430b5edc827e1368cf424fb888e997fc05d24e7e90373b8e9c6811a26eec80", + "extract_dir": "tools\\install\\sed-windows-master", + "post_install": "Remove-Item \"$dir\\tools\" -Recurse", "architecture": { "64bit": { - "url": "https://nuwen.net/files/mingw/components-18.0.7z", - "hash": "50b7bddbceda793098f2fed3a249fb02911f4a46c5d9a2e6c77079fa7e40b2ad" + "bin": [ + [ + "sed-4.8-x64.exe", + "sed" + ] + ] + }, + "32bit": { + "bin": [ + [ + "sed-4.8-xp.exe", + "sed" + ] + ] } }, - "extract_dir": "components-18.0", - "pre_install": [ - "Expand-7ZipArchive \"$dir\\sed-*.7z\" \"$dir\"", - "Get-ChildItem \"$dir\\*.7z\" | Remove-Item -Recurse -Force" - ], - "bin": "bin\\sed.exe", "checkver": { - "url": "https://nuwen.net/mingw.html", - "regex": "(?sm)>sed (?[\\d.]+).*?components-(?[\\d.]+).7z" + "url": "https://community.chocolatey.org/packages/sed", + "regex": "GNU sed ([\\d.]+)" }, "autoupdate": { + "url": "https://packages.chocolatey.org/sed.$version.nupkg", + "hash": { + "url": "https://community.chocolatey.org/packages/sed", + "regex": "$sha256.*?$basename" + }, "architecture": { "64bit": { - "url": "https://nuwen.net/files/mingw/components-$matchComponents.7z" + "bin": [ + [ + "sed-$version-x64.exe", + "sed" + ] + ] + }, + "32bit": { + "bin": [ + [ + "sed-$version-xp.exe", + "sed" + ] + ] } - }, - "extract_dir": "components-$matchComponents" + } } }