From a08b5e6247e863c1b0d382a6372a1c15c01e9371 Mon Sep 17 00:00:00 2001 From: David Rabkin Date: Wed, 8 Mar 2023 22:01:33 +0200 Subject: [PATCH] Use latest shellbase, release v0.9.20230308 --- README.md | 4 ++-- app/gento | 34 +--------------------------------- app/install | 4 ++-- 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 5be6ee9..7977724 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The artifact is a single executable POSIX-compliant shell script file file from the released version. RHEL demands administrative rights to write to `/usr/local/bin`, `sudo` before `tar` is used: ```sh -REL=0.9.20230227 +REL=0.9.20230308 SRC=https://github.com/rdavid/gento/archive/refs/tags/v$REL.tar.gz curl --location --silent $SRC | sudo tar \ @@ -31,7 +31,7 @@ with all dependencies run POSIX-compliant shell script file [`install`](https://github.com/rdavid/gento/blob/master/app/install) as a process owned by the superuser: ```sh -REL=0.9.20230227 +REL=0.9.20230308 SRC=https://github.com/rdavid/gento/archive/refs/tags/v$REL.tar.gz sudo su -c eval -c "$( curl --location --silent $SRC | diff --git a/app/gento b/app/gento index 1592aec..ce0bfcd 100755 --- a/app/gento +++ b/app/gento @@ -8,7 +8,7 @@ readonly \ BASE_APP_USAGE=Usage:\ gento\ settings-cnf-name.yml. \ BASE_APP_VERSION=0.9.20230308 \ - BASE_MIN_VERSION=0.9.20230212 + BASE_MIN_VERSION=0.9.20230308 . base.sh # First extracts a version from a sidecar settings file, on failure extracts @@ -389,25 +389,6 @@ parse_input() { readonly CFG CNF } -# Prints human readable uptime time, see: -# https://stackoverflow.com/questions/28353409/bash-format-uptime-to-show-days-hours-minutes -prettyuptime() { - uptime | sed -E ' - s/^[^,]*up *// - s/mins/minutes/ - s/hrs?/hours/ - s/([[:digit:]]+):0?([[:digit:]]+)/\1 hours, \2 minutes/ - s/^1 hours/1 hour/ - s/ 1 hours/ 1 hour/ - s/min,/minutes,/ - s/ 0 minutes,/ less than a minute,/ - s/ 1 minutes/ 1 minute/ - s/ / / - s/, *[[:digit:]]* users?.*// - s/^/↑ / - ' | tr -d \\n -} - # Gets local system information. read_info() { CNFA="$CNF" @@ -428,19 +409,6 @@ read_info() { SHELLBASE } -# Returns absolute path to a file, see: -# https://stackoverflow.com/questions/3915040/how-to-obtain-the-absolute-path-of-a-file-via-shell-bash-zsh-sh -realpath() { - local base dir1 dir2 file="$1" - dir1="$(dirname -- "$file")" || - die "$file": Unable to read a directory. - dir2="$(cd "$dir1" >/dev/null && pwd -P)" || - die "$dir1": Unable to change a directory. - base="$(basename -- "$file")" || - die "$file": Unable to read a basename. - printf %s/%s "$dir2" "$base" -} - # Adds environment variables for DCI if a resource file exists next to the # settings file. Otherwise DCI Agent will use default resource file. resource() { diff --git a/app/install b/app/install index 806a03e..4e46ba0 100755 --- a/app/install +++ b/app/install @@ -8,7 +8,7 @@ readonly \ BASE_APP_VERSION=0.9.20230308 \ DST=/usr/local/bin \ - GOR=0.9.20230227 \ + GOR=0.9.20230308 \ PKG="\ curl \ dci-ansible \ @@ -17,7 +17,7 @@ dci-openshift-app-agent \ jq \ python3-dciclient \ tar" \ - SHR=0.9.20230212 \ + SHR=0.9.20230308 \ USR=dci-openshift-app-agent \ YQR=4.31.2 readonly \