From 608941e7a3c53499d2e2283fde9a7ca7befa1706 Mon Sep 17 00:00:00 2001 From: Jason Runkle Date: Tue, 14 Apr 2020 15:29:02 +0000 Subject: [PATCH 1/2] Add debug logging to fetch-configlet for issue #1799. --- bin/fetch-configlet | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/fetch-configlet b/bin/fetch-configlet index c24ffa08b..8e54c97ce 100755 --- a/bin/fetch-configlet +++ b/bin/fetch-configlet @@ -2,6 +2,11 @@ LATEST=https://github.com/exercism/configlet/releases/latest +echo ">>> Fetching configlet..." +echo +echo "$ uname" +uname + OS=$( case $(uname) in (Darwin*) @@ -24,6 +29,9 @@ case $OS in echo "tgz";; esac) +echo "$ uname -m" +uname -m + ARCH=$( case $(uname -m) in (*64*) @@ -40,6 +48,9 @@ esac) VERSION="$(curl --silent --head $LATEST | awk -v FS=/ '/Location:/{print $NF}' | tr -d '\r')" URL=https://github.com/exercism/configlet/releases/download/$VERSION/configlet-$OS-${ARCH}.$EXT +echo +echo ">>> Downloading from ${URL}" + case $EXT in (*zip) curl -s --location $URL -o bin/latest-configlet.zip From 525141816cf11e011ad2bf5ba0ef32e60c145415 Mon Sep 17 00:00:00 2001 From: Jason Runkle Date: Tue, 14 Apr 2020 15:59:39 +0000 Subject: [PATCH 2/2] Fix the version fetching in fetch-configlet to be case-insensitive. --- bin/fetch-configlet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fetch-configlet b/bin/fetch-configlet index 8e54c97ce..39f65d62c 100755 --- a/bin/fetch-configlet +++ b/bin/fetch-configlet @@ -45,7 +45,7 @@ case $(uname -m) in esac) -VERSION="$(curl --silent --head $LATEST | awk -v FS=/ '/Location:/{print $NF}' | tr -d '\r')" +VERSION="$(curl --silent --head $LATEST | awk -v FS=/ 'BEGIN {IGNORECASE = 1} /Location:/{print $NF}' | tr -d '\r')" URL=https://github.com/exercism/configlet/releases/download/$VERSION/configlet-$OS-${ARCH}.$EXT echo