From: AJ ONeal Date: Wed, 3 Mar 2021 08:00:53 +0000 (+0000) Subject: minor cleanup X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=d356fd386b32bb568460aa5eaba1084a86b289d0;p=webi-installers%2F.git minor cleanup --- diff --git a/_webi/normalize.js b/_webi/normalize.js index 07b08c7..5232c27 100644 --- a/_webi/normalize.js +++ b/_webi/normalize.js @@ -135,6 +135,15 @@ function normalize(all) { } module.exports = normalize; +module.exports._debug = function (all) { + all = normalize(all); + all.releases = all.releases + .filter(function (r) { + return ['windows', 'macos', 'linux'].includes(r.os) && 'amd64' === r.arch; + }) + .slice(0, 10); + return all; +}; // NOT in order of priority (which would be tar, xz, zip, ...) module.exports.formats = formats; module.exports.arches = arches; diff --git a/caddy/README.md b/caddy/README.md index dbffbbf..424942a 100644 --- a/caddy/README.md +++ b/caddy/README.md @@ -100,7 +100,7 @@ Using a user named `app` to run your services is common industry convention. You can use `setcap` to allow Caddy to use privileged ports. ```bash -sudo setcap cap_net_bind_service=+ep $(readlink $(command -v caddy)) +sudo setcap cap_net_bind_service=+ep $(readlink -f $(command -v caddy)) ``` **systemd config** diff --git a/keypairs/install.sh b/keypairs/install.sh index 48c96aa..61bb1ad 100644 --- a/keypairs/install.sh +++ b/keypairs/install.sh @@ -20,7 +20,7 @@ function __init_keypairs() { pkg_install() { # $HOME/.local/opt/keypairs-v0.6.5/bin - mkdir -p "$pkg_src_bin" + mkdir -p "$(dirname $pkg_src_cmd)" # mv ./keypairs* "$HOME/.local/opt/keypairs-v0.6.5/bin/keypairs" mv ./"$pkg_cmd_name"* "$pkg_src_cmd" diff --git a/keypairs/releases.js b/keypairs/releases.js index 5204dbc..ec0fb13 100644 --- a/keypairs/releases.js +++ b/keypairs/releases.js @@ -13,6 +13,6 @@ module.exports = function (request) { if (module === require.main) { module.exports(require('@root/request')).then(function (all) { all = require('../_webi/normalize.js')(all); - console.info(JSON.stringify(all)); + console.info(JSON.stringify(all, null, 2)); }); } diff --git a/lf/install.sh b/lf/install.sh index 7eaa5fa..f488eb6 100644 --- a/lf/install.sh +++ b/lf/install.sh @@ -30,7 +30,7 @@ function __init_lf() { } pkg_get_current_version() { - # 'lf version' has output in this format: + # 'lf --version' has output in this format: # r21 # This treats it as a minor version number: # 0.21.0 diff --git a/lf/releases.js b/lf/releases.js index f92c356..6de6313 100644 --- a/lf/releases.js +++ b/lf/releases.js @@ -19,14 +19,7 @@ module.exports = function (request) { if (module === require.main) { module.exports(require('@root/request')).then(function (all) { - all = require('../_webi/normalize.js')(all); - all.releases = all.releases - .filter(function (r) { - return ( - ['windows', 'macos', 'linux'].includes(r.os) && 'amd64' === r.arch - ); - }) - .slice(0, 10); + all = require('../_webi/normalize.js')._debug(all); console.info(JSON.stringify(all, null, 2)); }); }