Created
May 12, 2025 18:55
-
-
Save tomharvey/c28f4653a1cdeecbdc97b82b8f890ceb to your computer and use it in GitHub Desktop.
install_delta.sh
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 | |
| # Create temp directory | |
| TEMP_DIR=$(mktemp -d) | |
| cd $TEMP_DIR | |
| # Download git-delta | |
| DELTA_VERSION="0.18.2" | |
| DELTA_ARCH="aarch64-unknown-linux-gnu" | |
| DELTA_URL="https://github.com/dandavison/delta/releases/download/${DELTA_VERSION}/delta-${DELTA_VERSION}-${DELTA_ARCH}.tar.gz" | |
| echo "Downloading git-delta from ${DELTA_URL}..." | |
| curl -L ${DELTA_URL} -o delta.tar.gz | |
| # Extract the archive | |
| echo "Extracting git-delta..." | |
| tar -xzf delta.tar.gz | |
| # Move the binary to a location in PATH | |
| echo "Installing git-delta..." | |
| sudo cp ./delta-${DELTA_VERSION}-${DELTA_ARCH}/delta /usr/local/bin/ | |
| sudo chmod +x /usr/local/bin/delta | |
| # Clean up | |
| cd - | |
| rm -rf $TEMP_DIR | |
| # Verify installation | |
| echo "Verifying installation..." | |
| delta --version | |
| echo "git-delta installed successfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment