From bdad2f6199f15c268040cea178d4b3b05b7996d4 Mon Sep 17 00:00:00 2001 From: Jerad C Date: Wed, 19 Oct 2022 15:09:22 -0500 Subject: [PATCH] update gh path within downloaded archive --- scripts/download-gh.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/download-gh.sh b/scripts/download-gh.sh index c1745b35..90de594f 100755 --- a/scripts/download-gh.sh +++ b/scripts/download-gh.sh @@ -50,5 +50,9 @@ echo "Downloading github.com/cli/cli@v${version} ..." mkdir -p "${dir_path}" cd "${dir_path}" +archive_path="gh_${version}_${os}_${arch}/bin" +gh_archive_path="${archive_path}/gh" wget https://github.com/cli/cli/releases/download/v${version}/gh_${version}_${os}_${arch}.tar.gz -O - | \ - tar xzf - gh + tar xzf - "${gh_archive_path}" +mv "${gh_archive_path}" . +rmdir -p "${archive_path}"