Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install: support arm64 arch #1185

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion install_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ processor=$(uname -m)

if [ "$processor" == "x86_64" ]; then
arch="amd64"
elif [ "$processor" == "arm64" ]; then
arch="arm64"
else
arch="386"
fi
Expand Down Expand Up @@ -41,7 +43,7 @@ else
fi

echo "Downloading TFLint $version"
curl -L -o /tmp/tflint.zip "https://github.com/terraform-linters/tflint/releases/download/${version}/tflint_${os}.zip"
curl --fail --silent -L -o /tmp/tflint.zip "https://github.com/terraform-linters/tflint/releases/download/${version}/tflint_${os}.zip"
Copy link
Contributor Author

@williamboman williamboman Aug 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added --fail because now it'd silently proceed, even when met with 404 (the subsequent unzip would fail instead). Also added --silent to reduce some noise. This both seems to be in line with other curl calls in this script. I included this in this PR because it's closely related to identifying which distribution to download

retVal=$?
if [ $retVal -ne 0 ]; then
echo "Failed to download tflint_${os}.zip"
Expand Down