bootstrap: librespeed-cli: refactor: Move aarch64 arm64 section out from Linux

This commit is contained in:
PorridgePi
2022-09-29 17:51:00 +08:00
parent 967e146480
commit 46c52068e2

View File

@@ -2,12 +2,12 @@ if ! command -v librespeed-cli &> /dev/null; then
echo 'Installing librespeed-cli' echo 'Installing librespeed-cli'
source $HOME/.zshenv source $HOME/.zshenv
if [[ "$OSNAME" == "Linux" ]]; then
# Linux
if [[ "$ARCH" == "aarch64" ]]; then if [[ "$ARCH" == "aarch64" ]]; then
ARCH=arm64 ARCH=arm64
fi fi
if [[ "$OSNAME" == "Linux" ]]; then
# Linux
URL=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest-cli/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep linux | grep $ARCH) URL=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest-cli/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep linux | grep $ARCH)
mkdir -p $HOME/.temp/librespeed mkdir -p $HOME/.temp/librespeed
curl -fsSL -o $HOME/.temp/librespeed/librespeed.tar.gz "$URL" curl -fsSL -o $HOME/.temp/librespeed/librespeed.tar.gz "$URL"