--- /dev/null
+#!/usr/bin/env pwsh
+
+$pkg_cmd_name = "yq"
+
+$pkg_dst_cmd = "$Env:USERPROFILE\.local\bin\yq.exe"
+$pkg_dst = "$pkg_dst_cmd"
+
+$pkg_src_cmd = "$Env:USERPROFILE\.local\opt\yq-v$Env:WEBI_VERSION\bin\yq.exe"
+$pkg_src_bin = "$Env:USERPROFILE\.local\opt\yq-v$Env:WEBI_VERSION\bin"
+$pkg_src_dir = "$Env:USERPROFILE\.local\opt\yq-v$Env:WEBI_VERSION"
+$pkg_src = "$pkg_src_cmd"
+
+$pkg_download = "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"
+
+IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"))
+{
+ echo "Downloading yq from $Env:WEBI_PKG_URL to $pkg_download"
+ & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
+ & move "$pkg_download.part" "$pkg_download"
+}
+
+IF (!(Test-Path -Path "$pkg_src_cmd"))
+{
+ echo "Installing yq"
+ pushd .local\tmp
+
+ Remove-Item -Path ".\yq-v*" -Recurse -ErrorAction Ignore
+ Remove-Item -Path ".\yq.exe" -Recurse -ErrorAction Ignore
+
+ echo "Unpacking $pkg_download"
+ & tar xf "$pkg_download"
+
+ echo "Install Location: $pkg_src_cmd"
+ New-Item "$pkg_src_bin" -ItemType Directory -Force
+ Move-Item -Path ".\yq.exe" -Destination "$pkg_src_bin"
+
+ popd
+}
+
+echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'"
+Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore
+Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse
--- /dev/null
+#!/bin/bash
+
+{
+ set -e
+ set -u
+
+ pkg_cmd_name="yq"
+
+ pkg_dst_cmd="$HOME/.local/bin/yq"
+ pkg_dst="$pkg_dst_cmd"
+
+ pkg_src_cmd="$HOME/.local/opt/yq-v$WEBI_VERSION/bin/yq"
+ pkg_src_dir="$HOME/.local/opt/yq-v$WEBI_VERSION"
+ pkg_src="$pkg_src_cmd"
+
+ pkg_install() {
+ mkdir -p "$(dirname $pkg_src_cmd)"
+ mv ./"$pkg_cmd_name"* "$pkg_src_cmd"
+ chmod a+x "$pkg_src_cmd"
+ }
+
+ pkg_get_current_version() {
+ echo $(yq --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2)
+ }
+
+}
--- /dev/null
+'use strict';
+
+var github = require('../_common/github.js');
+var owner = 'mikefarah';
+var repo = 'yq';
+
+module.exports = function(request) {
+ return github(request, owner, repo).then(function(all) {
+ return all;
+ });
+};
+
+if (module === require.main) {
+ module.exports(require('@root/request')).then(function(all) {
+ all = require('../_webi/normalize.js')(all);
+ all.releases = all.releases.slice(0, 5);
+ console.info(JSON.stringify(all, null, 2));
+ });
+}