fix latest release download failure

This commit is contained in:
tuti
2020-11-12 18:17:47 -08:00
parent 0a0a0ccddc
commit 154f894774

View File

@@ -12,9 +12,6 @@
if [ -n "$1" ]; then
version=v$1
else
version=$(curl -sL -o /dev/null -w %{url_effective} \
https://github.com/kubernetes-sigs/kustomize/releases/latest | rev | cut -d/ -f1 | rev)
fi
where=$PWD
@@ -49,7 +46,8 @@ curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases |\
grep $opsys |\
cut -d '"' -f 4 |\
grep /kustomize/$version.*amd64 |\
sort | xargs curl -sLO
sort | tail -n 1 |\
xargs curl -sLO
if [ -e ./kustomize_v*_${opsys}_amd64.tar.gz ]; then
tar xzf ./kustomize_v*_${opsys}_amd64.tar.gz