Skip to content

Commit

Permalink
Use latest shellbase, release v0.9.20230308
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavid committed Mar 8, 2023
1 parent 154c8c1 commit a08b5e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 |
Expand Down
34 changes: 1 addition & 33 deletions app/gento
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions app/install
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit a08b5e6

Please sign in to comment.