Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tomharvey/c28f4653a1cdeecbdc97b82b8f890ceb to your computer and use it in GitHub Desktop.

Select an option

Save tomharvey/c28f4653a1cdeecbdc97b82b8f890ceb to your computer and use it in GitHub Desktop.
install_delta.sh
#!/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