mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 02:06:03 +08:00
24 lines
639 B
Bash
Executable File
24 lines
639 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Setting up clang-format Docker wrapper..."
|
|
|
|
# Pull the Docker image with clang-format 18
|
|
echo "Pulling Docker image..."
|
|
docker pull silkeh/clang:18
|
|
|
|
# Create a wrapper script that runs clang-format in Docker
|
|
echo "Creating wrapper script..."
|
|
cat > /tmp/clang-format-wrapper <<'EOF'
|
|
#!/bin/bash
|
|
exec docker run --rm -i -v "$PWD:$PWD" -w "$PWD" silkeh/clang:18 clang-format "$@"
|
|
EOF
|
|
|
|
# Install the wrapper
|
|
sudo mv /tmp/clang-format-wrapper /usr/local/bin/clang-format
|
|
sudo chmod +x /usr/local/bin/clang-format
|
|
|
|
# Verify version and location
|
|
echo "Verifying installation..."
|
|
which clang-format
|
|
clang-format --version |