From 7ba973a69adb526041a63bbce69cc0de0dca0e3d Mon Sep 17 00:00:00 2001 From: Augusto Moura Date: Wed, 23 Sep 2020 21:09:50 -0300 Subject: [PATCH] add better formatting and commentaries --- bin/install | 5 ++++- bin/list-all | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/install b/bin/install index 83f7d2d..0e10b2c 100755 --- a/bin/install +++ b/bin/install @@ -53,12 +53,14 @@ install_nodejs() { ) } + resolve_version_query() { local version_query="$1" local aliased="$( + # Find the first candidate which the alias match, then print it version print_index_tab \ | filter_version_candidates \ - | awk -F'\t' -v "al=$version_query" '$1 == al { print $2; exit }' + | awk -F'\t' -v "alias=$version_query" '$1 == alias { print $2; exit }' )" if ! [ -z "$aliased" ]; then @@ -69,6 +71,7 @@ resolve_version_query() { fi } + construct_configure_options() { local install_path="$1" diff --git a/bin/list-all b/bin/list-all index 82397c1..e8399d0 100755 --- a/bin/list-all +++ b/bin/list-all @@ -7,5 +7,6 @@ source "$(dirname "$0")/../lib/utils.sh" # Print echo $( + # Only print the first column of candidates print_index_tab | filter_version_candidates | awk -F'\t' '{ print $1 }' | tac )