-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add platform detection to get-binaries.sh
- Loading branch information
Showing
1 changed file
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,33 @@ | ||
echo "Download centrifugo" | ||
wget --timeout=10 https://github.com/centrifugal/centrifugo/releases/download/v4.0.3/centrifugo_4.0.3_linux_amd64.tar.gz | ||
tar xvfz centrifugo_4.0.3_linux_amd64.tar.gz centrifugo | ||
rm -rf centrifugo_4.0.3_linux_amd64.tar.gz | ||
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m) | ||
|
||
if ! command -v wget &> /dev/null | ||
then | ||
echo "wget could not be found. Please install wget and try again." | ||
exit 1 | ||
fi | ||
|
||
if [ "$ARCH" = "x86_64" ]; then | ||
ARCH="amd64" | ||
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then | ||
ARCH="arm64" | ||
else | ||
echo "Failed to download binaries unsupported architecture: $ARCH" | ||
exit 1 | ||
fi | ||
|
||
echo "Detected OS: $OS, Architecture: $ARCH" | ||
|
||
echo "Downloading Centrifugo" | ||
wget --timeout=10 "https://github.com/centrifugal/centrifugo/releases/download/v4.0.3/centrifugo_4.0.3_${OS}_${ARCH}.tar.gz" | ||
tar xvfz centrifugo_4.0.3_${OS}_${ARCH}.tar.gz centrifugo | ||
rm -rf centrifugo_4.0.3_${OS}_${ARCH}.tar.gz | ||
chmod +x centrifugo | ||
|
||
echo "Download dolt db" | ||
wget --timeout=10 https://github.com/dolthub/dolt/releases/download/v1.42.8/dolt-linux-amd64.tar.gz | ||
tar xvfz dolt-linux-amd64.tar.gz dolt-linux-amd64/bin/dolt | ||
rm -rf dolt-linux-amd64.tar.gz | ||
mv dolt-linux-amd64/bin/dolt dolt | ||
rm -rf dolt-linux-amd64 | ||
echo "Downloading Dolt" | ||
wget --timeout=10 "https://github.com/dolthub/dolt/releases/download/v1.42.8/dolt-$OS-$ARCH.tar.gz" | ||
tar xvfz dolt-$OS-$ARCH.tar.gz dolt-$OS-$ARCH/bin/dolt | ||
rm -rf dolt-$OS-$ARCH.tar.gz | ||
mv dolt-$OS-$ARCH/bin/dolt dolt | ||
rm -rf dolt-$OS-$ARCH | ||
chmod +x dolt |