forked from colin/simple-glitchtip
23 lines
719 B
Bash
23 lines
719 B
Bash
#!/bin/bash
|
|
|
|
# Define plugin details
|
|
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 the package directory if it doesn't exist
|
|
mkdir -p "$PACKAGE_DIR"
|
|
|
|
# Download the controller file
|
|
curl -o "$PACKAGE_DIR/controller.php" -L "$CONTROLLER_URL"
|
|
|
|
# Download the Sentry SDK (as a .phar file)
|
|
curl -o "$PACKAGE_DIR/sentry.phar" -L "$SENTRY_SDK_URL"
|
|
|
|
# Set correct permissions
|
|
chmod 644 "$PACKAGE_DIR/controller.php"
|
|
chmod 644 "$PACKAGE_DIR/sentry.phar"
|
|
|
|
# Inform user
|
|
echo "Simple Glitchtip package installed/updated successfully."
|