From 8a85a9b3b3e49523040f6935369b4dbd4e0c652b Mon Sep 17 00:00:00 2001 From: pooneyy <85266337+pooneyy@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:14:59 +0800 Subject: [PATCH] patch: add apps/movie-pilot/scripts/ --- apps/movie-pilot/2.5.6/scripts/init.sh | 19 +++++++++++++++++++ apps/movie-pilot/2.5.6/scripts/uninstall.sh | 10 ++++++++++ apps/movie-pilot/2.5.6/scripts/upgrade.sh | 18 ++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 apps/movie-pilot/2.5.6/scripts/init.sh create mode 100644 apps/movie-pilot/2.5.6/scripts/uninstall.sh create mode 100644 apps/movie-pilot/2.5.6/scripts/upgrade.sh diff --git a/apps/movie-pilot/2.5.6/scripts/init.sh b/apps/movie-pilot/2.5.6/scripts/init.sh new file mode 100644 index 000000000..118f924a3 --- /dev/null +++ b/apps/movie-pilot/2.5.6/scripts/init.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + sed -i '/^APP_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + echo "APP_ENV_FILE=${CURRENT_DIR}/envs/movie-pilot.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/movie-pilot/2.5.6/scripts/uninstall.sh b/apps/movie-pilot/2.5.6/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/movie-pilot/2.5.6/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/movie-pilot/2.5.6/scripts/upgrade.sh b/apps/movie-pilot/2.5.6/scripts/upgrade.sh new file mode 100644 index 000000000..84793ac8a --- /dev/null +++ b/apps/movie-pilot/2.5.6/scripts/upgrade.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + sed -i '/^APP_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + echo "APP_ENV_FILE=${CURRENT_DIR}/envs/movie-pilot.env" >> .env + + echo "Check Finish." +else + echo "Error: .env file not found." +fi