The attached script provides a function for comparing semantic versions in a POSIX shell script.
Result | Description |
---|---|
-1 |
A<B |
0 |
A=B |
1 |
A>B |
The attached script provides a function for comparing Kubernetes versions in shell script. It's possible for the script to validate itself by invoking it with TEST_SEMVER_COMP=1
:
$ TEST_SEMVER_COMP=1 semver.sh
a b exp act
v1.0 v1.0 0 0
v10.0 v1.0 1 1
v1.0 v10.0 255 255
v1.14 v1.14.alpha1 1 1
The script posix-args.sh
provides two POSIX-compliant functions for getting the last argument in an array as well as getting all but the last argument. The following example illustrates how to use the functions and the expected results:
t="$(mktemp)" && \
curl -o "${t}" -sSL \
http://bit.ly/posix-args && \
. "${t}" && rm -f "${t}" # load the two functions from "posix-args.sh"
set -- one two three four # set the shell's arguments value
echo "there are ${#} args" # prints "there are 4 args"
The program rpctool
allows users on VMs running on vSphere to manipulate the VM's GuestInfo and OVF environment data.
root@photon-machine [ ~ ]# /var/lib/yakity/rpctool
COMMAND is required
usage: /var/lib/yakity/rpctool [FLAGS] COMMAND [ARGS]
COMMANDS
get KEY
Gets the value for the specified guestinfo key
/var/lib/kubernetes/e2e/platforms/linux/amd64/e2e.test \
-ginkgo.focus "should test kubelet managed /etc/hosts file \\[Conformance\\]" \
-ginkgo.skip "Alpha|Kubectl|\\[(Disruptive|Feature:[^\\]]+|Flaky)\\]" \
-disable-log-dump \
-provider "skeleton" \
-report-dir "/var/log/kubernetes/e2e" \
-v 10 2>&1 | tee /var/log/kubernetes/e2e/e2e.log || true
TF_VAR_run_conformance_tests=false | |
AWS_LOAD_BALANCER=false |
TF_VAR_run_conformance_tests=false | |
AWS_LOAD_BALANCER=false |
TF_VAR_run_conformance_tests=false | |
AWS_LOAD_BALANCER=false |
TF_VAR_run_conformance_tests=false | |
AWS_LOAD_BALANCER=false |