Update build.sh

This commit is contained in:
colin 2024-07-03 18:11:24 +00:00
parent 1336e85242
commit 270f6c183d
1 changed files with 19 additions and 4 deletions

View File

@ -1,7 +1,22 @@
#!/bin/bash
# Build the Docker image
docker build -t simple-tracking .
# Define the URL for downloading the simple-jaeger.php file
PLUGIN_URL="https://git.nixc.us/colin/SimpleJaeger/raw/branch/main/simple-jaeger.php"
# Run the Docker container
docker run -d -p 8080:80 --name simple-tracking simple-tracking
# 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."