mirror of
https://github.com/asdf-vm/asdf-nodejs.git
synced 2024-10-06 07:42:08 +08:00
28 lines
564 B
Bash
Executable File
28 lines
564 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# simulate tac on macOS
|
|
if ! command -v tac &>/dev/null; then
|
|
tac() {
|
|
cat -n "$@" | sort -nrk1 | cut -f2-
|
|
}
|
|
fi
|
|
|
|
set -o nounset -o pipefail -o errexit
|
|
|
|
# shellcheck source=../lib/utils.sh
|
|
source "$(dirname "$0")/../lib/utils.sh"
|
|
|
|
function print_only_fully_numeric_items() {
|
|
local version_numbers="$1"
|
|
grep -E '^[0-9.]+$' <<< "$version_numbers"
|
|
}
|
|
|
|
try_to_update_nodebuild >&2
|
|
|
|
all_definitions_from_node_build="$(nodebuild_wrapped --definitions)"
|
|
|
|
# Print
|
|
echo $(
|
|
print_only_fully_numeric_items "$all_definitions_from_node_build"
|
|
)
|