-
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.
chore: switch docs to static s3 site (#8)
- Loading branch information
1 parent
15eb899
commit e9cc252
Showing
2 changed files
with
40 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
install_s5cmd() { | ||
arch=$(uname -m) | ||
case $arch in | ||
arm64|aarch64) | ||
S5CMD_BIN="s5cmd_2.2.2_linux_arm64.deb" | ||
;; | ||
x86_64|amd64) | ||
S5CMD_BIN="s5cmd_2.2.2_linux_amd64.deb" | ||
;; | ||
*) | ||
echo "Unsupported architecture: $arch" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
echo "Checking s5cmd" | ||
if type s5cmd &>/dev/null; then | ||
echo "s5cmd was installed." | ||
else | ||
TMP_DIR=/tmp/s5cmd | ||
rm -rf $TMP_DIR | ||
mkdir $TMP_DIR | ||
echo "s5cmd was not installed. Installing.." | ||
wget "https://github.com/peak/s5cmd/releases/download/v2.2.2/${S5CMD_BIN}" -P $TMP_DIR | ||
sudo dpkg -i "${TMP_DIR}/${S5CMD_BIN}" | ||
fi | ||
} |