-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1113f28
commit 85da53c
Showing
4 changed files
with
52 additions
and
5 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
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
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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# Determine the architecture from the TARGETARCH environment variable | ||
ARCH=$TARGETARCH | ||
|
||
# Set the download URL based on the architecture | ||
if [ "$ARCH" = "amd64" ]; then | ||
URL="https://oso-local-development-binary.s3.amazonaws.com/oso-local-development-binary-linux-x86_64.tar.gz" | ||
elif [ "$ARCH" = "arm64" ]; then | ||
URL="https://oso-local-development-binary.s3.amazonaws.com/dev/oso-local-development-binary-linux-arm64.tar.gz" | ||
else | ||
echo "Unsupported architecture: $ARCH" | ||
exit 1 | ||
fi | ||
|
||
# Define the output file name | ||
OUTPUT_FILE="oso-local-development-binary.tar.gz" | ||
|
||
# Download the binary | ||
echo "Downloading binary for $ARCH..." | ||
curl -L $URL -o $OUTPUT_FILE | ||
|
||
# Check if the download was successful | ||
if [ $? -eq 0 ]; then | ||
echo "Download complete. Decompressing the binary..." | ||
|
||
# Decompress the binary | ||
tar -xzf $OUTPUT_FILE | ||
|
||
# Check if the decompression was successful | ||
if [ $? -eq 0 ]; then | ||
echo "Binary decompressed successfully." | ||
# Here you might want to move or use the binary. | ||
else | ||
echo "Failed to decompress the binary." | ||
exit 1 | ||
fi | ||
else | ||
echo "Failed to download the binary." | ||
exit 1 | ||
fi |