From fa4937b6973731c87e5f30648d386d23ad71f203 Mon Sep 17 00:00:00 2001 From: ms Date: Wed, 14 Aug 2024 20:53:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Ubuntu=20=E6=9D=83?= =?UTF-8?q?=E9=99=90=E4=B8=8D=E8=B6=B3=EF=BC=8C=E9=80=A0=E6=88=90=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/app_install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/script/app_install.sh b/script/app_install.sh index 25db06a5..2aabda39 100644 --- a/script/app_install.sh +++ b/script/app_install.sh @@ -51,6 +51,10 @@ repos=( 'https://gitea.com/QYG2297248353/appstore-1panel' ) +if [ -d "${BASE_DIR:?}/1panel/resource/apps/local/appstore-localApps" ]; then + rm -rf "${BASE_DIR:?}/1panel/resource/apps/local/appstore-localApps" +fi + for repo in "${repos[@]}"; do echo "$(date): Step 1 - Cloning repository: $repo" git clone --depth 1 -b released "$repo" "${BASE_DIR:?}/1panel/resource/apps/local/appstore-localApps" && break @@ -74,6 +78,10 @@ if [ ! -w "$LOCAL_DIR" ]; then exit 1 fi +if [ ! -d "$DEST_ENVS_DIR" ]; then + mkdir -p "$DEST_ENVS_DIR" +fi + if [ ! -w "$DEST_ENVS_DIR" ]; then echo "Error: No write permission to $DEST_ENVS_DIR." echo "Please run as a superuser."