diff --git a/install.sh b/install.sh index cdcbe55..06e13be 100644 --- a/install.sh +++ b/install.sh @@ -1,22 +1,22 @@ #!/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" +CONTROLLER_URL="https://git.nixc.us/nixius/simple-glitchtip-c5/raw/branch/main/controller.php" +SENTRY_SDK_URL="https://github.com/getsentry/sentry-php/releases/latest/download/sentry.phar" +PACKAGE_DIR="./packages/simple_glitchtip" -# Create plugin directory if it doesn't exist -mkdir -p "$PLUGIN_DIR" +# Create the package directory if it doesn't exist +mkdir -p "$PACKAGE_DIR" -# Download the plugin file -curl -o "$PLUGIN_DIR/simple-glitchtip.php" "$PLUGIN_URL" +# Download the controller file +curl -o "$PACKAGE_DIR/controller.php" -L "$CONTROLLER_URL" -# Download the Raven client (Sentry/Glitchtip SDK) -curl -o "$PLUGIN_DIR/raven-client.phar" -L "$RAVEN_CLIENT_URL" +# Download the Sentry SDK (as a .phar file) +curl -o "$PACKAGE_DIR/sentry.phar" -L "$SENTRY_SDK_URL" # Set correct permissions -chmod 644 "$PLUGIN_DIR/simple-glitchtip.php" -chmod 644 "$PLUGIN_DIR/raven-client.phar" +chmod 644 "$PACKAGE_DIR/controller.php" +chmod 644 "$PACKAGE_DIR/sentry.phar" # Inform user -echo "Simple Glitchtip plugin installed/updated successfully." +echo "Simple Glitchtip package installed/updated successfully."