Created
December 23, 2025 15:21
-
-
Save ebal/1ce348bdbf8de3b61ffd65dd4fa946c4 to your computer and use it in GitHub Desktop.
Brave binary installation
This file contains hidden or 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
| #!/bin/bash | |
| set -e # Exit on error | |
| # vim: sts=2 sw=2 ts=2 et | |
| # Get the latest stable Brave browser release tag using GitHub API | |
| # Create temporary directory | |
| TEMP_DIR=$(mktemp -d) | |
| echo "Created temporary directory: $TEMP_DIR" | |
| # Cleanup function | |
| cleanup() { | |
| echo "Cleaning up temporary directory..." | |
| rm -rf "$TEMP_DIR" | |
| } | |
| trap cleanup EXIT | |
| TAG=$(curl -sL https://api.github.com/repos/brave/brave-browser/releases/latest | jq -r '.tag_name') | |
| # Remove first character (v) | |
| VERSION=${TAG#v} | |
| ARCHIVE="$TEMP_DIR/brave.zip" | |
| echo "Downloading Brave $VERSION..." | |
| curl -sLo "$ARCHIVE" \ | |
| https://github.com/brave/brave-browser/releases/download/v${VERSION}/brave-browser-${VERSION}-linux-amd64.zip | |
| echo "Extracting Brave..." | |
| sudo mkdir -p /opt/brave | |
| sudo unzip -q "$ARCHIVE" -d /opt/brave/ | |
| echo "Installation complete!" | |
| echo "Brave files have been extracted to /opt/brave" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment