From a7f366c994a1306ebdf818014c4797a0ec3e5d2e Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Thu, 14 Dec 2017 19:56:21 +0100 Subject: Revert "shellcheck: FIX: use $2 as seems intended in list_print" $ ./kerl update releases The available releases are: cat: /home/travis/.kerl/otp_spaces: No such file or directory This reverts commit 536e9f4895d1c1e91338228f2a73a1af5a6cfd42. --- kerl | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'kerl') diff --git a/kerl b/kerl index 7774dc0..aefbb7c 100755 --- a/kerl +++ b/kerl @@ -1435,11 +1435,7 @@ maybe_remove() { list_print() { if [ -f "$KERL_BASE_DIR/otp_$1" ]; then if [ "$(wc -l "$KERL_BASE_DIR/otp_$1")" != '0' ]; then - if [ -z "$2" ]; then - cat "$KERL_BASE_DIR/otp_$1" - else - cat "$KERL_BASE_DIR/otp_$2" - fi + cat "$KERL_BASE_DIR/otp_$1" return 0 fi fi @@ -1917,7 +1913,7 @@ case "$1" in rm -f "${KERL_BASE_DIR:?}"/otp_releases check_releases echo 'The available releases are:' - list_print releases spaces + list_print releases ;; *) update_usage @@ -1933,7 +1929,7 @@ case "$1" in case "$2" in releases) check_releases - list_print "$2" space + list_print "$2" echo "Run '$0 update releases' to update this list from erlang.org" ;; builds) -- cgit v1.2.3