Last active
April 22, 2026 12:18
-
-
Save geoder101/aaad6e21ac183b1d7b7452024870e767 to your computer and use it in GitHub Desktop.
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Downloads and runs the latest official Clojure Linux installer. | |
| DOWNLOAD_DIR="/tmp" | |
| INSTALLER_PATH="${DOWNLOAD_DIR}/clojure-linux-installer.sh" | |
| INSTALLER_URL="https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh" | |
| # Cleanup installer on exit (success or error) | |
| trap "rm -f '$INSTALLER_PATH'" EXIT | |
| if ! command -v curl >/dev/null 2>&1; then | |
| echo "Error: curl is required but not installed." | |
| exit 1 | |
| fi | |
| mkdir -p "$DOWNLOAD_DIR" | |
| echo "Downloading latest Clojure installer to $INSTALLER_PATH" | |
| curl -fL -o "$INSTALLER_PATH" "$INSTALLER_URL" | |
| chmod +x "$INSTALLER_PATH" | |
| echo "Running installer with sudo" | |
| sudo "$INSTALLER_PATH" "$@" | |
| echo "Clojure installation complete." | |
| clojure -Sdescribe || { echo "Error: Clojure installation verification failed." >&2; exit 1; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment