From 723d14c951ee0726175b50d302afbfb2e2e92fcf Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 3 Jul 2024 18:11:47 +0000 Subject: [PATCH] Add install.sh --- install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..c557797 --- /dev/null +++ b/install.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Define the URL for downloading the simple-jaeger.php file +PLUGIN_URL="https://git.nixc.us/colin/SimpleJaeger/raw/branch/main/simple-jaeger.php" + +# Define the target directory +TARGET_DIR="wp-content/plugins/simple-jaeger" + +# Create the target directory if it doesn't exist +mkdir -p $TARGET_DIR + +# Download the simple-jaeger.php file into the target directory +curl -o $TARGET_DIR/simple-jaeger.php $PLUGIN_URL + +# Create a blank tracking-code.php file if it doesn't already exist +touch $TARGET_DIR/tracking-code.php + +# Set the correct permissions for the files +chmod 644 $TARGET_DIR/simple-jaeger.php +chmod 644 $TARGET_DIR/tracking-code.php + +echo "SimpleJaeger plugin has been installed or updated successfully."