From 821960d0d0cb867b516e9d64c42cd404d0a86a17 Mon Sep 17 00:00:00 2001 From: liutao <821580467@qq.com> Date: Tue, 6 May 2025 13:17:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=B7=A5=E5=85=B7=E3=80=91=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tool/dll_tools/revert_and_pull_git.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Tool/dll_tools/revert_and_pull_git.sh b/Tool/dll_tools/revert_and_pull_git.sh index 851109b4af8..b420fa2a851 100644 --- a/Tool/dll_tools/revert_and_pull_git.sh +++ b/Tool/dll_tools/revert_and_pull_git.sh @@ -9,7 +9,6 @@ echo "初始目录: $INITIAL_DIR" # 定义目标目录 TARGET_DIR="../../ProjectNLD/Assets/Code/Scripts/GamePlay" -echo "尝试切换到目录: $TARGET_DIR" # 先判断目录是否存在, 如果不存在则使用git clone命令克隆, 仓库地址为http://1.14.122.170:3000/PHXH/GamePlay.git if [ ! -d "$TARGET_DIR" ]; then @@ -23,12 +22,19 @@ if [ ! -d "$TARGET_DIR" ]; then exit 1 fi echo "成功进入目录: $(pwd)" - git clone http://1.14.122.170:3000/PHXH/GamePlay.git + git clone http://1.14.122.170:3000/PHXH/GamePlay.git GamePlay # 检查克隆是否成功 if [ $? -ne 0 ]; then echo "错误: 克隆仓库失败,请检查网络连接或仓库地址是否正确" exit 1 fi + cd GamePlay + # 检查是否进入成功 + if [ $? -ne 0 ]; then + echo "错误: 无法进入 GamePlay 目录,请检查路径是否正确" + echo "当前目录: $(pwd)" + exit 1 + fi echo "成功克隆仓库: $TARGET_DIR" # cd 回到原目录 @@ -36,6 +42,7 @@ if [ ! -d "$TARGET_DIR" ]; then echo "成功回到初始目录: $(pwd)" fi +echo "尝试切换到目录: $TARGET_DIR" # cd 到需要操作目录 cd "$TARGET_DIR" # 检查是否进入成功