asdf-nodejs/bin/list-all
2023-05-18 14:00:34 -03:00

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"
)