#!/bin/bash # Define plugin details PLUGIN_URL="https://git.nixc.us/colin/simple-glitchtip/raw/branch/main/simple-glitchtip.php" RAVEN_CLIENT_URL="https://github.com/getsentry/sentry-php/releases/download/3.5.1/sentry-php.phar" PLUGIN_DIR="./wp-content/plugins/simple-glitchtip" # Create plugin directory if it doesn't exist mkdir -p "$PLUGIN_DIR" # Download the plugin file curl -o "$PLUGIN_DIR/simple-glitchtip.php" "$PLUGIN_URL" # Download the Raven client (Sentry/Glitchtip SDK) curl -o "$PLUGIN_DIR/raven-client.phar" -L "$RAVEN_CLIENT_URL" # Set correct permissions chmod 644 "$PLUGIN_DIR/simple-glitchtip.php" chmod 644 "$PLUGIN_DIR/raven-client.phar" # Inform user echo "Simple Glitchtip plugin installed/updated successfully."