added gcloud intro
- Created a new script `instalL_asciinema.sh` to automate the installation of asciinema. - The script detects the operating system and architecture to download the appropriate binary. - Supports Linux (both musl and GNU) and macOS (Darwin). - Sets executable permissions for the downloaded binary and verifies the installation by displaying the version.
This commit is contained in:
parent
f3d077e3c4
commit
09f36dff16
26 changed files with 493 additions and 33 deletions
46
scripts/instalL_asciinema.sh
Executable file
46
scripts/instalL_asciinema.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
## available versions as of Tue 7 Oct 18:34:05 BST 2025
|
||||
|
||||
# https://github.com/asciinema/asciinema/releases/download/v3.0.0/asciinema-aarch64-apple-darwin
|
||||
# https://github.com/asciinema/asciinema/releases/download/v3.0.0/asciinema-aarch64-unknown-linux-gnu
|
||||
# https://github.com/asciinema/asciinema/releases/download/v3.0.0/asciinema-x86_64-apple-darwin
|
||||
# https://github.com/asciinema/asciinema/releases/download/v3.0.0/asciinema-x86_64-unknown-linux-gnu
|
||||
# https://github.com/asciinema/asciinema/releases/download/v3.0.0/asciinema-x86_64-unknown-linux-musl
|
||||
|
||||
VERSION="3.0.0"
|
||||
LINK="https://github.com/asciinema/asciinema/releases/download/v${VERSION}/asciinema-"
|
||||
|
||||
unameOut="$(uname -s)"
|
||||
archOut="$(uname -m)"
|
||||
|
||||
case "${unameOut}" in
|
||||
Linux)
|
||||
if ldd --version 2>&1 | grep -q musl; then
|
||||
platform="x86_64-unknown-linux-musl"
|
||||
else
|
||||
platform="x86_64-unknown-linux-gnu"
|
||||
fi
|
||||
if [[ "${archOut}" == "aarch64" ]]; then
|
||||
platform="aarch64-unknown-linux-gnu"
|
||||
fi
|
||||
;;
|
||||
Darwin)
|
||||
if [[ "${archOut}" == "arm64" ]]; then
|
||||
platform="aarch64-apple-darwin"
|
||||
else
|
||||
platform="x86_64-apple-darwin"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported platform: ${unameOut} ${archOut}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Detected platform: $platform"
|
||||
echo "installing asciinema version ${VERSION} for ${platform}"
|
||||
sudo curl -sL "${LINK}${platform}" -o /usr/local/bin/asciinema
|
||||
sudo chmod +x /usr/local/bin/asciinema
|
||||
asciinema --version
|
||||
Loading…
Add table
Add a link
Reference in a new issue