#!/bin/bash
+set -e
+set -u
function __init_gprox() {
- set -e
- set -u
##################
# Install gprox #
pkg_src_dir="$HOME/.local/opt/gprox-v$WEBI_VERSION"
pkg_src="$pkg_src_cmd"
+ WEBI_SINGLE=true
+
# pkg_get_current_version is recommended, but (soon) not required
pkg_get_current_version() {
# 'gprox --version' has output in this format:
# gprox 0.99.9 (rev abcdef0123)
# This trims it down to just the version number:
# 0.99.9
- echo $(gprox --version 2> /dev/null | head -n 1 | cut -d ' ' -f 2)
+ gprox --version 2> /dev/null |
+ head -n 1 |
+ cut -d ' ' -f 2
}
}
pkg_src_dir="$HOME/.local/opt/kind-v$WEBI_VERSION"
pkg_src="$pkg_src_cmd"
- pkg_install() {
- mkdir -p "$(dirname $pkg_src_cmd)"
- mv ./kind-*/kind "$pkg_src_cmd"
- }
+ WEBI_SINGLE=true
pkg_get_current_version() {
- echo $(kind --version 2> /dev/null | head -n 1 | cut -d ' ' -f 2)
+ kind --version 2> /dev/null |
+ head -n 1 |
+ cut -d ' ' -f 2
}
}