17 lines
479 B
Bash
Executable File
17 lines
479 B
Bash
Executable File
WP_THEMES="rookie"
|
|
if [ "$#" -lt 1 ]; then
|
|
echo "Error: COMPOSE_FILE argument is missing."
|
|
echo "Usage: $0 COMPOSE_FILE"
|
|
exit 1
|
|
fi
|
|
|
|
COMPOSE_FILE="$1"
|
|
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
|
ENV_FILE=$SCRIPTPATH/.env
|
|
|
|
# this env file is not being read and i don't know why.
|
|
# it's actually being loaded from compose.yml
|
|
|
|
docker compose -f $COMPOSE_FILE run --env WP_THEMES="$WP_THEMES" --rm -it wp-cli sh -c \
|
|
'wp theme install $WP_THEMES'
|