).then(
//getAllReleases(require('@root/request'), 'root', 'serviceman', 'https://git.rootprojects.org').then(
function (all) {
- console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all, null, 2));
}
);
}
if (module === require.main) {
getAllReleases(require('@root/request'), 'BurntSushi', 'ripgrep').then(
function (all) {
- console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all, null, 2));
}
);
}
if (!rel.os) {
rel.os =
Object.keys(osMap).find(function (regKey) {
- /*
- console.log(
+ /* console.log(
'release os:',
regKey,
osMap[regKey],
+++ /dev/null
-#!/bin/bash
-
-# title: Homebrew
-# homepage: https://brew.sh
-# tagline: The Missing Package Manager for macOS (or Linux)
-# description: |
-# Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
-# examples: |
-# ```bash
-# brew install node
-# ```
-
-# Straight from https://brew.sh
-/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
--- /dev/null
+#!/bin/bash
+
+# title: Homebrew
+# homepage: https://brew.sh
+# tagline: The Missing Package Manager for macOS (or Linux)
+# description: |
+# Homebrew installs the stuff you need that Apple (or your Linux system) didn’t.
+# examples: |
+# ```bash
+# brew install node
+# ```
+
+# Straight from https://brew.sh
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
+++ /dev/null
-# title: Caddy
-# homepage: https://github.com/caddyserver/caddy
-# tagline: Fast, multi-platform web server with automatic HTTPS
-# description: |
-# Caddy is an extensible server platform that uses TLS by default.
-# examples: |
-# ```bash
-# caddy start
-# ```
-
-set -e
-set -u
-
-#################
-# Install caddy #
-#################
-
-new_caddy="${HOME}/.local/bin/caddy"
-
-# Test for existing version
-set +e
-cur_caddy="$(command -v caddy)"
-set -e
-if [ -n "$cur_caddy" ]; then
- cur_ver=$(caddy version | head -n 1 | cut -d ' ' -f 2)
- if [ "$cur_ver" == "$WEBI_VERSION" ]; then
- echo "caddy v$WEBI_VERSION already installed at $cur_caddy"
- exit 0
- elif [ "$cur_caddy" != "$new_caddy" ]; then
- echo "WARN: possible conflict with caddy v$WEBI_VERSION at $cur_caddy"
- fi
-fi
-
-# Note: this file is `source`d by the true installer and hence will have the webi functions
-
-# because we created releases.js we can use webi_download()
-# downloads caddy to ~/Downloads
-webi_download
-
-# because this is tar or zip, we can webi_extract()
-# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
-webi_extract
-
-pushd "$WEBI_TMP" 2>&1 >/dev/null
- echo Installing caddy v${WEBI_VERSION} as "$new_caddy"
- mv ./caddy "$HOME/.local/bin/"
-popd 2>&1 >/dev/null
-
-###################
-# Update PATH #
-###################
-
-# TODO get better output from pathman / output the path to add as return to webi bootstrap
-webi_path_add "$HOME/.local/bin"
-
-echo "Installed 'caddy'"
-echo ""
--- /dev/null
+# title: Caddy
+# homepage: https://github.com/caddyserver/caddy
+# tagline: Fast, multi-platform web server with automatic HTTPS
+# description: |
+# Caddy is an extensible server platform that uses TLS by default.
+# examples: |
+# ```bash
+# caddy start
+# ```
+
+set -e
+set -u
+
+#################
+# Install caddy #
+#################
+
+new_caddy="${HOME}/.local/bin/caddy"
+
+# Test for existing version
+set +e
+cur_caddy="$(command -v caddy)"
+set -e
+if [ -n "$cur_caddy" ]; then
+ cur_ver=$(caddy version | head -n 1 | cut -d ' ' -f 2)
+ if [ "$cur_ver" == "$WEBI_VERSION" ]; then
+ echo "caddy v$WEBI_VERSION already installed at $cur_caddy"
+ exit 0
+ elif [ "$cur_caddy" != "$new_caddy" ]; then
+ echo "WARN: possible conflict with caddy v$WEBI_VERSION at $cur_caddy"
+ fi
+fi
+
+# Note: this file is `source`d by the true installer and hence will have the webi functions
+
+# because we created releases.js we can use webi_download()
+# downloads caddy to ~/Downloads
+webi_download
+
+# because this is tar or zip, we can webi_extract()
+# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
+webi_extract
+
+pushd "$WEBI_TMP" 2>&1 >/dev/null
+ echo Installing caddy v${WEBI_VERSION} as "$new_caddy"
+ mv ./caddy "$HOME/.local/bin/"
+popd 2>&1 >/dev/null
+
+###################
+# Update PATH #
+###################
+
+# TODO get better output from pathman / output the path to add as return to webi bootstrap
+webi_path_add "$HOME/.local/bin"
+
+echo "Installed 'caddy'"
+echo ""
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
- console.log(JSON.stringify(all));
+ console.info(JSON.stringify(all));
});
}
+++ /dev/null
-#!/bin/bash
-
-# title: Flutter
-# homepage: https://flutter.dev
-# tagline: UI Toolkit for mobile, web, and desktop
-# description: |
-# Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.
-# examples: |
-#
-# ```bash
-# flutter create my_app
-# ```
-
-set -e
-set -u
-
-###################
-# Install flutter #
-###################
-
-new_flutter_home="${HOME}/.local/opt/flutter-v${WEBI_VERSION}"
-new_flutter="${HOME}/.local/opt/flutter-v${WEBI_VERSION}/bin/flutter"
-
-# Test for existing version
-set +e
-cur_flutter="$(command -v flutter)"
-set -e
-if [ -n "$cur_flutter" ]; then
- cur_ver=$(flutter --version | head -n 1 | cut -d' ' -f2)
- if [ "$cur_ver" == "$(echo $WEBI_VERSION)" ]; then
- echo "flutter v$WEBI_VERSION already installed at $cur_flutter"
- exit 0
- elif [ "$cur_flutter" != "$new_flutter" ]; then
- echo "WARN: possible conflict with flutter v$WEBI_VERSION at $cur_flutter"
- fi
-fi
-
-webi_download
-
-webi_extract
-
-pushd "${WEBI_TMP}" 2>&1 >/dev/null
- echo Installing flutter v${WEBI_VERSION} as "$new_flutter"
-
- # simpler for single-binary commands
- #mv ./example*/bin/example "$HOME/.local/bin"
-
- # best for packages and toolchains
- rm -rf "$new_flutter_home"
- if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
- rsync -Krl ./flutter*/ "$new_flutter_home/" 2>/dev/null
- else
- cp -Hr ./flutter*/* "$new_flutter_home/" 2>/dev/null
- cp -Hr ./flutter*/.* "$new_flutter_home/" 2>/dev/null
- fi
-popd 2>&1 >/dev/null
-
-###################
-# Update PATH #
-###################
-
-# TODO get better output from pathman / output the path to add as return to webi bootstrap
-webi_path_add "$new_flutter_home/bin"
-echo "Installed 'flutter'"
-echo ""
--- /dev/null
+#!/bin/bash
+
+# title: Flutter
+# homepage: https://flutter.dev
+# tagline: UI Toolkit for mobile, web, and desktop
+# description: |
+# Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.
+# examples: |
+#
+# ```bash
+# flutter create my_app
+# ```
+
+set -e
+set -u
+
+###################
+# Install flutter #
+###################
+
+new_flutter_home="${HOME}/.local/opt/flutter-v${WEBI_VERSION}"
+new_flutter="${HOME}/.local/opt/flutter-v${WEBI_VERSION}/bin/flutter"
+
+# Test for existing version
+set +e
+cur_flutter="$(command -v flutter)"
+set -e
+if [ -n "$cur_flutter" ]; then
+ cur_ver=$(flutter --version | head -n 1 | cut -d' ' -f2)
+ if [ "$cur_ver" == "$(echo $WEBI_VERSION)" ]; then
+ echo "flutter v$WEBI_VERSION already installed at $cur_flutter"
+ exit 0
+ elif [ "$cur_flutter" != "$new_flutter" ]; then
+ echo "WARN: possible conflict with flutter v$WEBI_VERSION at $cur_flutter"
+ fi
+fi
+
+webi_download
+
+webi_extract
+
+pushd "${WEBI_TMP}" 2>&1 >/dev/null
+ echo Installing flutter v${WEBI_VERSION} as "$new_flutter"
+
+ # simpler for single-binary commands
+ #mv ./example*/bin/example "$HOME/.local/bin"
+
+ # best for packages and toolchains
+ rm -rf "$new_flutter_home"
+ if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
+ rsync -Krl ./flutter*/ "$new_flutter_home/" 2>/dev/null
+ else
+ cp -Hr ./flutter*/* "$new_flutter_home/" 2>/dev/null
+ cp -Hr ./flutter*/.* "$new_flutter_home/" 2>/dev/null
+ fi
+popd 2>&1 >/dev/null
+
+###################
+# Update PATH #
+###################
+
+# TODO get better output from pathman / output the path to add as return to webi bootstrap
+webi_path_add "$new_flutter_home/bin"
+echo "Installed 'flutter'"
+echo ""
body.releases.forEach(function (asset) {
if (!map[asset.channel]) {
map[asset.channel] = true;
- console.log('a', asset.channel);
}
all.releases.push({
// nix leading 'v'
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
all.releases = all.releases.slice(25);
- console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all, null, 2));
});
}
+++ /dev/null
-# title: Go (golang alias)
-# homepage: https://webinstall.dev/golang
-# tagline: Alias for https://webinstall.dev/golang
-# alias: golang
-# description: |
-# See https://webinstall.dev/golang
-
-curl -fsSL https://webinstall.dev/golang | bash
--- /dev/null
+# title: Go (golang alias)
+# homepage: https://webinstall.dev/golang
+# tagline: Alias for https://webinstall.dev/golang
+# alias: golang
+# description: |
+# See https://webinstall.dev/golang
+
+curl -fsSL https://webinstall.dev/golang | bash
+++ /dev/null
-#!/bin/bash
-
-# title: Go
-# homepage: https://golang.org
-# tagline: The Go Programming Language tools
-# description: |
-# Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
-# examples: |
-# ```bash
-# mkdir -p hello/
-# pushd hello/
-# ```
-# <br/>
-#
-# ```bash
-# cat << EOF >> main.go
-# package main
-#
-# import (
-# "fmt"
-# )
-#
-# func main () {
-# fmt.Println("Hello, World!")
-# }
-# EOF
-# ```
-# <br/>
-#
-# ```bash
-# go fmt ./...
-# go build .
-# ./hello
-# > Hello, World!
-# ```
-
-set -e
-set -u
-
-###################
-# Install go #
-###################
-
-new_go_home="${HOME}/.local/opt/go-v${WEBI_VERSION}"
-new_go="${HOME}/.local/opt/go-v${WEBI_VERSION}/bin/go"
-
-# Test for existing version
-set +e
-cur_go="$(command -v go)"
-set -e
-if [ -n "$cur_go" ]; then
- cur_ver=$(go version | cut -d' ' -f3 | sed 's:go::')
- if [ "$cur_ver" == "$(echo $WEBI_VERSION | sed 's:\.0::g')" ]; then
- echo "go v$WEBI_VERSION already installed at $cur_go"
- exit 0
- elif [ "$cur_go" != "$new_go" ]; then
- echo "WARN: possible conflict with go v$WEBI_VERSION at $cur_go"
- fi
-fi
-
-
-# Note: this file is `source`d by the true installer and hence will have the webi functions
-
-# because we created releases.js we can use webi_download()
-# downloads go to ~/Downloads
-webi_download
-
-# because this is tar or zip, we can webi_extract()
-# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
-webi_extract
-
-pushd "$WEBI_TMP" 2>&1 >/dev/null
- echo Installing go v${WEBI_VERSION} as "$new_go"
-
- # simpler for single-binary commands
- #mv ./example*/bin/example "$HOME/.local/bin"
-
- # best for packages and toolchains
- rm -rf "$new_go_home"
- if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
- rsync -Krl ./go*/ "$new_go_home/" 2>/dev/null
- else
- cp -Hr ./go*/* "$new_go_home/" 2>/dev/null
- cp -Hr ./go*/.* "$new_go_home/" 2>/dev/null
- fi
-
- # Install x go
- $new_go_home/bin/go get golang.org/x/tools/cmd/goimports > /dev/null 2>/dev/null
- $new_go_home/bin/go get golang.org/x/tools/cmd/gorename > /dev/null 2>/dev/null
- $new_go_home/bin/go get golang.org/x/tools/cmd/gotype > /dev/null 2>/dev/null
- $new_go_home/bin/go get golang.org/x/tools/cmd/stringer > /dev/null 2>/dev/null
-popd 2>&1 >/dev/null
-
-###################
-# Update PATH #
-###################
-
-# TODO get better output from pathman / output the path to add as return to webi bootstrap
-webi_path_add "$new_go_home/bin"
-webi_path_add "$HOME/go/bin"
-
-echo "Installed 'go' (and go tools)"
-echo ""
--- /dev/null
+#!/bin/bash
+
+# title: Go
+# homepage: https://golang.org
+# tagline: The Go Programming Language tools
+# description: |
+# Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
+# examples: |
+# ```bash
+# mkdir -p hello/
+# pushd hello/
+# ```
+# <br/>
+#
+# ```bash
+# cat << EOF >> main.go
+# package main
+#
+# import (
+# "fmt"
+# )
+#
+# func main () {
+# fmt.Println("Hello, World!")
+# }
+# EOF
+# ```
+# <br/>
+#
+# ```bash
+# go fmt ./...
+# go build .
+# ./hello
+# > Hello, World!
+# ```
+
+set -e
+set -u
+
+###################
+# Install go #
+###################
+
+new_go_home="${HOME}/.local/opt/go-v${WEBI_VERSION}"
+new_go="${HOME}/.local/opt/go-v${WEBI_VERSION}/bin/go"
+
+# Test for existing version
+set +e
+cur_go="$(command -v go)"
+set -e
+if [ -n "$cur_go" ]; then
+ cur_ver=$(go version | cut -d' ' -f3 | sed 's:go::')
+ if [ "$cur_ver" == "$(echo $WEBI_VERSION | sed 's:\.0::g')" ]; then
+ echo "go v$WEBI_VERSION already installed at $cur_go"
+ exit 0
+ elif [ "$cur_go" != "$new_go" ]; then
+ echo "WARN: possible conflict with go v$WEBI_VERSION at $cur_go"
+ fi
+fi
+
+
+# Note: this file is `source`d by the true installer and hence will have the webi functions
+
+# because we created releases.js we can use webi_download()
+# downloads go to ~/Downloads
+webi_download
+
+# because this is tar or zip, we can webi_extract()
+# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
+webi_extract
+
+pushd "$WEBI_TMP" 2>&1 >/dev/null
+ echo Installing go v${WEBI_VERSION} as "$new_go"
+
+ # simpler for single-binary commands
+ #mv ./example*/bin/example "$HOME/.local/bin"
+
+ # best for packages and toolchains
+ rm -rf "$new_go_home"
+ if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
+ rsync -Krl ./go*/ "$new_go_home/" 2>/dev/null
+ else
+ cp -Hr ./go*/* "$new_go_home/" 2>/dev/null
+ cp -Hr ./go*/.* "$new_go_home/" 2>/dev/null
+ fi
+
+ # Install x go
+ $new_go_home/bin/go get golang.org/x/tools/cmd/goimports > /dev/null 2>/dev/null
+ $new_go_home/bin/go get golang.org/x/tools/cmd/gorename > /dev/null 2>/dev/null
+ $new_go_home/bin/go get golang.org/x/tools/cmd/gotype > /dev/null 2>/dev/null
+ $new_go_home/bin/go get golang.org/x/tools/cmd/stringer > /dev/null 2>/dev/null
+popd 2>&1 >/dev/null
+
+###################
+# Update PATH #
+###################
+
+# TODO get better output from pathman / output the path to add as return to webi bootstrap
+webi_path_add "$new_go_home/bin"
+webi_path_add "$HOME/go/bin"
+
+echo "Installed 'go' (and go tools)"
+echo ""
getAllReleases(require('@root/request')).then(function (all) {
all = require('../_common/normalize.js')(all);
all.releases = all.releases.slice(0, 10);
- console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all, null, 2));
});
}
--- /dev/null
+# title: macOS
+# homepage: https://bootableinstaller.com/macos/
+# tagline: Bootable macOS Installer
+# description: |
+# Downloads the official OS X / macOS dmg from Apple to create bootable installers - works from macOS, Linux, or even Windows (through VirtualBox).
+# examples: |
+#
+# Use with Balena Etcher to burn ISO to USB, or boot with VirtualBox.
+#
+# ```txt
+# Created ~/Downloads/el-capitan.iso
+# ```
+
+set -e
+set -u
+
+webi_download
+
+pushd ~/Downloads 2>&1 >/dev/null
+
+if [ "Darwin" == "$(uname -s)" ]; then
+ curl -fsSL 'https://gist.githubusercontent.com/solderjs/8c36d132250163011c83bad8284975ee/raw/5a291955813743c20c12ca2d35c7b1bb34f8aecc/create-bootable-installer-for-os-x-el-capitan.sh' -o create-bootable-installer-for-os-x-el-capitan.sh
+ bash create-bootable-installer-for-os-x-el-capitan.sh
+else
+ curl -fsSL 'https://gist.githubusercontent.com/solderjs/9834a45a6c21a41e8882698a00b55787/raw/c43061cd0c53ec675996f5cb66c7077e666aabd4/install-mac-tools.sh' -o install-mac-tools.sh
+ # TODO add xar to webinstall.dev
+ sudo apt install libz-dev # needed for xar
+ bash install-mac-tools.sh
+ echo "WARN: may need a restart for hfsplus to be recognized by the kernel"
+
+ curl -fsSL 'https://gist.github.com/solderjs/04fd06560a8465a695337eb502f5b0e9/raw/0a06fb4dce91399d374d9a12958dabb48a9bd42a/empty.7400m.img.bz2' -o empty.7400m.img.bz2
+
+ curl -fsSL 'https://gist.githubusercontent.com/solderjs/9834a45a6c21a41e8882698a00b55787/raw/c43061cd0c53ec675996f5cb66c7077e666aabd4/linux-create-bootable-macos-recovery-image.sh' -o linux-create-bootable-macos-recovery-image.sh
+ bash linux-create-bootable-macos-recovery-image.sh
+fi
+
+echo ""
+echo "Created $HOME/Downloads/el-capitan.iso"
+echo ""
+
+popd 2>&1 >/dev/null
+++ /dev/null
-# title: macOS
-# homepage: https://bootableinstaller.com/macos/
-# tagline: Bootable macOS Installer
-# description: |
-# Downloads the official OS X / macOS dmg from Apple to create bootable installers - works from macOS, Linux, or even Windows (through VirtualBox).
-# examples: |
-#
-# Use with Balena Etcher to burn ISO to USB, or boot with VirtualBox.
-#
-# ```txt
-# Created ~/Downloads/el-capitan.iso
-# ```
-
-set -e
-set -u
-
-webi_download
-
-pushd ~/Downloads 2>&1 >/dev/null
-
-if [ "Darwin" == "$(uname -s)" ]; then
- curl -fsSL 'https://gist.githubusercontent.com/solderjs/8c36d132250163011c83bad8284975ee/raw/5a291955813743c20c12ca2d35c7b1bb34f8aecc/create-bootable-installer-for-os-x-el-capitan.sh' -o create-bootable-installer-for-os-x-el-capitan.sh
- bash create-bootable-installer-for-os-x-el-capitan.sh
-else
- curl -fsSL 'https://gist.githubusercontent.com/solderjs/9834a45a6c21a41e8882698a00b55787/raw/c43061cd0c53ec675996f5cb66c7077e666aabd4/install-mac-tools.sh' -o install-mac-tools.sh
- # TODO add xar to webinstall.dev
- sudo apt install libz-dev # needed for xar
- bash install-mac-tools.sh
- echo "WARN: may need a restart for hfsplus to be recognized by the kernel"
-
- curl -fsSL 'https://gist.github.com/solderjs/04fd06560a8465a695337eb502f5b0e9/raw/0a06fb4dce91399d374d9a12958dabb48a9bd42a/empty.7400m.img.bz2' -o empty.7400m.img.bz2
-
- curl -fsSL 'https://gist.githubusercontent.com/solderjs/9834a45a6c21a41e8882698a00b55787/raw/c43061cd0c53ec675996f5cb66c7077e666aabd4/linux-create-bootable-macos-recovery-image.sh' -o linux-create-bootable-macos-recovery-image.sh
- bash linux-create-bootable-macos-recovery-image.sh
-fi
-
-echo ""
-echo "Created $HOME/Downloads/el-capitan.iso"
-echo ""
-
-popd 2>&1 >/dev/null
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
- console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all, null, 2));
});
}
--- /dev/null
+#!/bin/bash
+
+# title: Node.js
+# homepage: https://nodejs.org
+# tagline: JavaScript V8 runtime
+# description: |
+# Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine
+# examples: |
+# ```bash
+# node -e 'console.log("Hello, World!")'
+# > Hello, World!
+# ```
+# <br/>
+# <br/>
+#
+# <table>
+# <tr>
+# <td>Run a webserver</td>
+# <td><pre><code class="language-bash">
+# mkdir my-server
+# pushd my-server
+# npm init
+# npm install --save express</code></pre>
+# <br/>
+# <code>app.js:</code>
+# <br/>
+# <pre><code class="language-javascript">'use strict'
+# var express = require('express');
+# var app = express();
+#
+# app.use('/', function (req, res, next) {
+# res.end("Hello, World!");
+# });
+#
+# module.exports = app;</code></pre>
+# <br/>
+# <code>server.js:</code>
+# <br/>
+# <pre><code class="language-javascript">'use strict'
+# var http = require('http');
+# var app = require('./app.js');
+# http.createServer(app).listen(8080, function () {
+# console.log('Listening on', this.address());
+# });</code></pre>
+# <br/>
+# <pre><code class="language-bash">npm start</code></pre>
+# </td>
+# </tr>
+# </table>
+
+set -e
+set -u
+
+##################
+# Install node #
+##################
+
+new_node_home="${HOME}/.local/opt/node-v${WEBI_VERSION}"
+new_node="${HOME}/.local/opt/node-v${WEBI_VERSION}/bin/node"
+
+# Test for existing version
+set +e
+cur_node="$(command -v node)"
+set -e
+if [ -e "$new_node_home/bin/node" ]; then
+ # node of some version is already installed
+ if [ "v${WEBI_VERSION}" == "$("$new_node_home/bin/node" -v 2>/dev/null)" ]; then
+ echo node v${WEBI_VERSION} already installed at $new_node_home
+ exit 0
+ fi
+fi
+if [ -n "$cur_node" ] && [ "$cur_node" != "$new_node" ]; then
+ echo "WARN: possible conflict with node v$WEBI_VERSION at $cur_node"
+fi
+
+# Note: this file is `source`d by the true installer and hence will have the webi functions
+
+# because we created releases.js we can use webi_download()
+# downloads node to ~/Downloads
+webi_download
+
+# because this is tar or zip, we can webi_extract()
+# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
+webi_extract
+
+pushd "$WEBI_TMP" 2>&1 >/dev/null
+ echo Installing node v${WEBI_VERSION} as "$new_node"
+
+ # simpler for single-binary commands
+ #mv ./example*/bin/example "$HOME/.local/bin"
+
+ # best for packages and toolchains
+ rm -rf "$new_node_home"
+ if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
+ rsync -Krl ./node*/ "$new_node_home/" 2>/dev/null
+ else
+ cp -Hr ./node*/* "$new_node_home/" 2>/dev/null
+ cp -Hr ./node*/.* "$new_node_home/" 2>/dev/null
+ fi
+popd 2>&1 >/dev/null
+
+###################
+# Update PATH #
+###################
+
+# TODO get better output from pathman / output the path to add as return to webi bootstrap
+webi_path_add "$new_node_home/bin"
+
+echo "Installed 'node' and 'npm'"
+echo ""
+++ /dev/null
-#!/bin/bash
-
-# title: Node.js
-# homepage: https://nodejs.org
-# tagline: JavaScript V8 runtime
-# description: |
-# Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine
-# examples: |
-# ```bash
-# node -e 'console.log("Hello, World!")'
-# > Hello, World!
-# ```
-# <br/>
-# <br/>
-#
-# <table>
-# <tr>
-# <td>Run a webserver</td>
-# <td><pre><code class="language-bash">
-# mkdir my-server
-# pushd my-server
-# npm init
-# npm install --save express</code></pre>
-# <br/>
-# <code>app.js:</code>
-# <br/>
-# <pre><code class="language-javascript">'use strict'
-# var express = require('express');
-# var app = express();
-#
-# app.use('/', function (req, res, next) {
-# res.end("Hello, World!");
-# });
-#
-# module.exports = app;</code></pre>
-# <br/>
-# <code>server.js:</code>
-# <br/>
-# <pre><code class="language-javascript">'use strict'
-# var http = require('http');
-# var app = require('./app.js');
-# http.createServer(app).listen(8080, function () {
-# console.log('Listening on', this.address());
-# });</code></pre>
-# <br/>
-# <pre><code class="language-bash">npm start</code></pre>
-# </td>
-# </tr>
-# </table>
-
-set -e
-set -u
-
-##################
-# Install node #
-##################
-
-new_node_home="${HOME}/.local/opt/node-v${WEBI_VERSION}"
-new_node="${HOME}/.local/opt/node-v${WEBI_VERSION}/bin/node"
-
-# Test for existing version
-set +e
-cur_node="$(command -v node)"
-set -e
-if [ -e "$new_node_home/bin/node" ]; then
- # node of some version is already installed
- if [ "v${WEBI_VERSION}" == "$("$new_node_home/bin/node" -v 2>/dev/null)" ]; then
- echo node v${WEBI_VERSION} already installed at $new_node_home
- exit 0
- fi
-fi
-if [ -n "$cur_node" ] && [ "$cur_node" != "$new_node" ]; then
- echo "WARN: possible conflict with node v$WEBI_VERSION at $cur_node"
-fi
-
-# Note: this file is `source`d by the true installer and hence will have the webi functions
-
-# because we created releases.js we can use webi_download()
-# downloads node to ~/Downloads
-webi_download
-
-# because this is tar or zip, we can webi_extract()
-# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
-webi_extract
-
-pushd "$WEBI_TMP" 2>&1 >/dev/null
- echo Installing node v${WEBI_VERSION} as "$new_node"
-
- # simpler for single-binary commands
- #mv ./example*/bin/example "$HOME/.local/bin"
-
- # best for packages and toolchains
- rm -rf "$new_node_home"
- if [ -n "$(command -v rsync 2>/dev/null | grep rsync)" ]; then
- rsync -Krl ./node*/ "$new_node_home/" 2>/dev/null
- else
- cp -Hr ./node*/* "$new_node_home/" 2>/dev/null
- cp -Hr ./node*/.* "$new_node_home/" 2>/dev/null
- fi
-popd 2>&1 >/dev/null
-
-###################
-# Update PATH #
-###################
-
-# TODO get better output from pathman / output the path to add as return to webi bootstrap
-webi_path_add "$new_node_home/bin"
-
-echo "Installed 'node' and 'npm'"
-echo ""
if (module === require.main) {
getAllReleases(require('@root/request')).then(function (all) {
- console.log(JSON.stringify(all));
- //console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all));
+ //console.info(JSON.stringify(all, null, 2));
});
}
--- /dev/null
+#!/bin/bash
+
+# title: Pathman
+# homepage: https://git.rootprojects.org/root/pathman
+# tagline: cross-platform PATH management for bash, zsh, fish, cmd.exe, and PowerShell
+# description: |
+# Manages PATH on various OSes and shells
+# - Mac, Windows, Linux
+# - Bash, Zsh, Fish
+# - Command, Powershell
+# examples: |
+# ```bash
+# pathman add ~/.local/bin
+# ```
+# <br/>
+#
+# ```bash
+# pathman remove ~/.local/bin
+# ```
+# <br/>
+#
+# ```bash
+# pathman list
+# ```
+
+
+set -e
+set -u
+
+# Test if in PATH
+set +e
+my_pathman=$(command -v pathman)
+set -e
+if [ -n "$my_pathman" ]; then
+ # TODO test pathman version
+ # if [ "$WEBI_VERSION" == "$(pathman version | cut -d ' ' -f2)" ]; then
+ if [ "$my_pathman" != "$HOME/.local/bin/pathman" ]; then
+ echo "a pathman installation (which make take precedence) exists at:"
+ echo " $my_pathman"
+ echo ""
+ fi
+ echo "pathman already installed"
+ exit 0
+fi
+
+# TODO use webi_download via releases.js
+webi_download "https://rootprojects.org/pathman/dist/$(uname -s)/$(uname -m)/pathman" "$HOME/.local/bin/pathman"
+
+# TODO use webi_extract
+chmod +x "$HOME/.local/bin/pathman"
+
+# add to ~/.local/bin to PATH even if pathman is elsewhere
+# TODO pathman needs silent option and debug output (quiet "already exists" output)
+"$HOME/.local/bin/pathman" add ~/.local/bin # > /dev/null 2> /dev/null
+# TODO inform user to add to path, apart from pathman?
+++ /dev/null
-#!/bin/bash
-
-# title: Pathman
-# homepage: https://git.rootprojects.org/root/pathman
-# tagline: cross-platform PATH management for bash, zsh, fish, cmd.exe, and PowerShell
-# description: |
-# Manages PATH on various OSes and shells
-# - Mac, Windows, Linux
-# - Bash, Zsh, Fish
-# - Command, Powershell
-# examples: |
-# ```bash
-# pathman add ~/.local/bin
-# ```
-# <br/>
-#
-# ```bash
-# pathman remove ~/.local/bin
-# ```
-# <br/>
-#
-# ```bash
-# pathman list
-# ```
-
-
-set -e
-set -u
-
-# Test if in PATH
-set +e
-my_pathman=$(command -v pathman)
-set -e
-if [ -n "$my_pathman" ]; then
- # TODO test pathman version
- # if [ "$WEBI_VERSION" == "$(pathman version | cut -d ' ' -f2)" ]; then
- if [ "$my_pathman" != "$HOME/.local/bin/pathman" ]; then
- echo "a pathman installation (which make take precedence) exists at:"
- echo " $my_pathman"
- echo ""
- fi
- echo "pathman already installed"
- exit 0
-fi
-
-# TODO use webi_download via releases.js
-webi_download "https://rootprojects.org/pathman/dist/$(uname -s)/$(uname -m)/pathman" "$HOME/.local/bin/pathman"
-
-# TODO use webi_extract
-chmod +x "$HOME/.local/bin/pathman"
-
-# add to ~/.local/bin to PATH even if pathman is elsewhere
-# TODO pathman needs silent option and debug output (quiet "already exists" output)
-"$HOME/.local/bin/pathman" add ~/.local/bin # > /dev/null 2> /dev/null
-# TODO inform user to add to path, apart from pathman?
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
- console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all, null, 2));
});
}
--- /dev/null
+# title: Ripgrep
+# homepage: https://github.com/BurntSushi/ripgrep
+# tagline: a modern drop-in grep replacement
+# alias: rg
+# description: |
+# `rg` is a drop-in replacement for `grep`, that respects `.gitignore` and `.ignore`, has all of the sensible default options you want (colors, numbers, etc) turned on by default, is written in Rust, and simply outperforms grep in every imaginable way. R.I.P. grep.
+# examples: |
+#
+# ```bash
+# rg <search-term> # searches recursively, ignoing .git, node_modules, etc
+# ```
+#
+# ```bash
+# rg 'function doStuff'
+# ```
+#
+# ```bash
+# rg 'doStuff\(.*\)'
+# ```
+
+set -e
+set -u
+
+###################
+# Install ripgrep #
+###################
+
+new_rg="${HOME}/.local/bin/rg"
+
+# Test for existing version
+set +e
+cur_rg="$(command -v rg)"
+set -e
+if [ -n "$cur_rg" ]; then
+ cur_ver=$(rg --version | head -n 1 | cut -d ' ' -f 2)
+ if [ "$cur_ver" == "$WEBI_VERSION" ]; then
+ echo "ripgrep v$WEBI_VERSION already installed at $cur_rg"
+ exit 0
+ elif [ "$cur_rg" != "$new_rg" ]; then
+ echo "WARN: possible conflict with ripgrep v$WEBI_VERSION at $cur_rg"
+ fi
+fi
+
+# Note: this file is `source`d by the true installer and hence will have the webi functions
+
+# because we created releases.js we can use webi_download()
+# downloads ripgrep to ~/Downloads
+webi_download
+
+# because this is tar or zip, we can webi_extract()
+# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
+webi_extract
+
+pushd "$WEBI_TMP" 2>&1 >/dev/null
+ echo Installing ripgrep v${WEBI_VERSION} as "$new_rg"
+ mv ./ripgrep-*/rg "$HOME/.local/bin/"
+popd 2>&1 >/dev/null
+
+###################
+# Update PATH #
+###################
+
+# TODO get better output from pathman / output the path to add as return to webi bootstrap
+webi_path_add "$HOME/.local/bin"
+
+echo "Installed 'rg'"
+echo ""
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
- console.log(JSON.stringify(all));
- //console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all));
+ //console.info(JSON.stringify(all, null, 2));
});
}
+++ /dev/null
-# title: Ripgrep
-# homepage: https://github.com/BurntSushi/ripgrep
-# tagline: a modern drop-in grep replacement
-# alias: rg
-# description: |
-# `rg` is a drop-in replacement for `grep`, that respects `.gitignore` and `.ignore`, has all of the sensible default options you want (colors, numbers, etc) turned on by default, is written in Rust, and simply outperforms grep in every imaginable way. R.I.P. grep.
-# examples: |
-#
-# ```bash
-# rg <search-term> # searches recursively, ignoing .git, node_modules, etc
-# ```
-#
-# ```bash
-# rg 'function doStuff'
-# ```
-#
-# ```bash
-# rg 'doStuff\(.*\)'
-# ```
-
-set -e
-set -u
-
-###################
-# Install ripgrep #
-###################
-
-new_rg="${HOME}/.local/bin/rg"
-
-# Test for existing version
-set +e
-cur_rg="$(command -v rg)"
-set -e
-if [ -n "$cur_rg" ]; then
- cur_ver=$(rg --version | head -n 1 | cut -d ' ' -f 2)
- if [ "$cur_ver" == "$WEBI_VERSION" ]; then
- echo "ripgrep v$WEBI_VERSION already installed at $cur_rg"
- exit 0
- elif [ "$cur_rg" != "$new_rg" ]; then
- echo "WARN: possible conflict with ripgrep v$WEBI_VERSION at $cur_rg"
- fi
-fi
-
-# Note: this file is `source`d by the true installer and hence will have the webi functions
-
-# because we created releases.js we can use webi_download()
-# downloads ripgrep to ~/Downloads
-webi_download
-
-# because this is tar or zip, we can webi_extract()
-# extracts to the WEBI_TMP directory, raw (no --strip-prefix)
-webi_extract
-
-pushd "$WEBI_TMP" 2>&1 >/dev/null
- echo Installing ripgrep v${WEBI_VERSION} as "$new_rg"
- mv ./ripgrep-*/rg "$HOME/.local/bin/"
-popd 2>&1 >/dev/null
-
-###################
-# Update PATH #
-###################
-
-# TODO get better output from pathman / output the path to add as return to webi bootstrap
-webi_path_add "$HOME/.local/bin"
-
-echo "Installed 'rg'"
-echo ""
--- /dev/null
+# title: Ripgrep (alias)
+# homepage: https://webinstall.dev/rg
+# tagline: `ripgrep` (project) is an alias for `rg` (command)
+# alias: rg
+# description: |
+# See https://webinstall.dev/rg
+
+echo "'ripgrep' (project) is an alias for 'rg' (command)"
+curl -fsSL https://webinstall.dev/rg@${WEBI_VERSION:-} | bash
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
- console.log(JSON.stringify(all));
- //console.log(JSON.stringify(all, null, 2));
+ console.info(JSON.stringify(all));
+ //console.info(JSON.stringify(all, null, 2));
});
}
+++ /dev/null
-# title: Ripgrep (alias)
-# homepage: https://webinstall.dev/rg
-# tagline: `ripgrep` (project) is an alias for `rg` (command)
-# alias: rg
-# description: |
-# See https://webinstall.dev/rg
-
-echo "'ripgrep' (project) is an alias for 'rg' (command)"
-curl -fsSL https://webinstall.dev/rg@${WEBI_VERSION:-} | bash
--- /dev/null
+# title: Rust (rustlang alias)
+# homepage: https://webinstall.dev/rustlang
+# tagline: Alias for https://webinstall.dev/rustlang
+# alias: rustlang
+# description: |
+# See https://webinstall.dev/rustlang
+
+curl -fsSL https://webinstall.dev/rustlang | bash
+++ /dev/null
-# title: Rust (rustlang alias)
-# homepage: https://webinstall.dev/rustlang
-# tagline: Alias for https://webinstall.dev/rustlang
-# alias: rustlang
-# description: |
-# See https://webinstall.dev/rustlang
-
-curl -fsSL https://webinstall.dev/rustlang | bash
--- /dev/null
+#!/bin/bash
+
+# title: Rust
+# homepage: https://rust-lang.org
+# tagline: The Rust Toolchain
+# description: |
+# A language empowering everyone to build reliable and efficient software.
+#
+# Rust is the modern language used to build all of your favorite CLI tools, such as
+# - rg (ripgrep, modern grep)
+# - fd (modern find)
+# - sd (modern sed)
+# - lsd (modern ls)
+# - bat (modern cat)
+# examples: |
+# ```bash
+# cargo install ripgrep
+# ```
+# <br/>
+#
+# ```bash
+# cargo new hello --bin
+# cargo build --release
+# ./hello
+# > "Hello, world!"
+# ```
+
+
+# Straight from https://rustup.rs/
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+++ /dev/null
-#!/bin/bash
-
-# title: Rust
-# homepage: https://rust-lang.org
-# tagline: The Rust Toolchain
-# description: |
-# A language empowering everyone to build reliable and efficient software.
-#
-# Rust is the modern language used to build all of your favorite CLI tools, such as
-# - rg (ripgrep, modern grep)
-# - fd (modern find)
-# - sd (modern sed)
-# - lsd (modern ls)
-# - bat (modern cat)
-# examples: |
-# ```bash
-# cargo install ripgrep
-# ```
-# <br/>
-#
-# ```bash
-# cargo new hello --bin
-# cargo build --release
-# ./hello
-# > "Hello, world!"
-# ```
-
-
-# Straight from https://rustup.rs/
-curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
--- /dev/null
+#!/bin/bash
+
+# title: Serviceman
+# homepage: https://git.rootprojects.org/root/serviceman
+# tagline: cross-platform service management for Linux, Mac, and Windows
+# description: |
+# A system laucher that wraps `launchctl` (macOS), `systemctl` (Linux),
+# and the Windows Registry to work cross-platform.
+# examples: |
+#
+# Works with anything, including
+#
+# ### Node.js
+#
+# ```bash
+# serviceman add --name my-service node ./serve.js --port 3000
+# ```
+#
+# ### Golang
+#
+# ```bash
+# go build -mod vendor cmd/my-service
+# serviceman add ./my-service --port 3000
+# ```
+#
+# ### And even bash!
+#
+# ```bash
+# serviceman add --name backuper bash ./backup.sh /mnt/data
+# ```
+
+set -e
+set -u
+
+# Test if in PATH
+set +e
+my_serviceman=$(command -v serviceman)
+set -e
+if [ -n "$my_serviceman" ]; then
+ if [ "$my_serviceman" != "$HOME/.local/bin/serviceman" ]; then
+ echo "a serviceman installation (which make take precedence) exists at:"
+ echo " $my_serviceman"
+ echo ""
+ fi
+fi
+
+# Get arch envs, etc
+webi_download "https://rootprojects.org/serviceman/dist/$(uname -s)/$(uname -m)/serviceman" "$HOME/Downloads/serviceman"
+chmod +x "$HOME/Downloads/serviceman"
+mv "$HOME/Downloads/serviceman" "$HOME/.local/bin/"
+
+# add to ~/.local/bin to PATH, just in case
+webi_path_add $HOME/.local/bin # > /dev/null 2> /dev/null
+# TODO inform user to add to path, apart from pathman?
+++ /dev/null
-#!/bin/bash
-
-# title: Serviceman
-# homepage: https://git.rootprojects.org/root/serviceman
-# tagline: cross-platform service management for Linux, Mac, and Windows
-# description: |
-# A system laucher that wraps `launchctl` (macOS), `systemctl` (Linux),
-# and the Windows Registry to work cross-platform.
-# examples: |
-#
-# Works with anything, including
-#
-# ### Node.js
-#
-# ```bash
-# serviceman add --name my-service node ./serve.js --port 3000
-# ```
-#
-# ### Golang
-#
-# ```bash
-# go build -mod vendor cmd/my-service
-# serviceman add ./my-service --port 3000
-# ```
-#
-# ### And even bash!
-#
-# ```bash
-# serviceman add --name backuper bash ./backup.sh /mnt/data
-# ```
-
-set -e
-set -u
-
-# Test if in PATH
-set +e
-my_serviceman=$(command -v serviceman)
-set -e
-if [ -n "$my_serviceman" ]; then
- if [ "$my_serviceman" != "$HOME/.local/bin/serviceman" ]; then
- echo "a serviceman installation (which make take precedence) exists at:"
- echo " $my_serviceman"
- echo ""
- fi
-fi
-
-# Get arch envs, etc
-webi_download "https://rootprojects.org/serviceman/dist/$(uname -s)/$(uname -m)/serviceman" "$HOME/Downloads/serviceman"
-chmod +x "$HOME/Downloads/serviceman"
-mv "$HOME/Downloads/serviceman" "$HOME/.local/bin/"
-
-# add to ~/.local/bin to PATH, just in case
-webi_path_add $HOME/.local/bin # > /dev/null 2> /dev/null
-# TODO inform user to add to path, apart from pathman?
--- /dev/null
+#!/bin/bash
+
+# title: vim-sensible
+# homepage: https://github.com/tpope/vim-sensible
+# tagline: sensible defaults for vim
+# description: |
+# Think of sensible.vim as one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on.
+# examples: |
+# N/A
+
+mkdir -p $HOME/.vim/pack/plugins/start
+rm -rf $HOME/.vim/pack/plugins/start/sensible
+git clone --depth=1 https://tpope.io/vim/sensible.git $HOME/.vim/pack/plugins/start/sensible
+++ /dev/null
-#!/bin/bash
-
-# title: vim-sensible
-# homepage: https://github.com/tpope/vim-sensible
-# tagline: sensible defaults for vim
-# description: |
-# Think of sensible.vim as one step above 'nocompatible' mode: a universal set of defaults that (hopefully) everyone can agree on.
-# examples: |
-# N/A
-
-mkdir -p $HOME/.vim/pack/plugins/start
-rm -rf $HOME/.vim/pack/plugins/start/sensible
-git clone --depth=1 https://tpope.io/vim/sensible.git $HOME/.vim/pack/plugins/start/sensible
--- /dev/null
+#!/bin/bash
+
+# title: Webi
+# homepage: https://webinstall.dev
+# tagline: webinstall.dev for the CLI
+# description: |
+# for the people like us that are too lazy even to run <kbd>curl https://webinstall.dev/PACKAGE_NAME | bash</kbd>
+# examples: |
+# ```bash
+# webi node@latest
+# ```
+# <br/>
+#
+# ```bash
+# webi golang@v1.14
+# ```
+# <br/>
+#
+# ```bash
+# webi rustlang
+# ```
+
+if [ -f "$HOME/.local/bin/webi" ]; then
+ echo "Installed 'webi'"
+else
+ echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
+fi
+++ /dev/null
-#!/bin/bash
-
-# title: Webi
-# homepage: https://webinstall.dev
-# tagline: webinstall.dev for the CLI
-# description: |
-# for the people like us that are too lazy even to run <kbd>curl https://webinstall.dev/PACKAGE_NAME | bash</kbd>
-# examples: |
-# ```bash
-# webi node@latest
-# ```
-# <br/>
-#
-# ```bash
-# webi golang@v1.14
-# ```
-# <br/>
-#
-# ```bash
-# webi rustlang
-# ```
-
-if [ -f "$HOME/.local/bin/webi" ]; then
- echo "Installed 'webi'"
-else
- echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
-fi