From d4877d283d3b443988f25aeb1accb7d9f77f737c Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sat, 6 Jul 2024 19:12:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9B=86=E6=88=90=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=89=A7=E8=A1=8C=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/cid.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/handler/cid.go b/handler/cid.go index 56c04fe..70094bb 100644 --- a/handler/cid.go +++ b/handler/cid.go @@ -62,12 +62,12 @@ func RunCID(c *gin.Context) { //脚本内容 scriptContent := `#!/bin/bash - TARGET_DIR = ` + proto.CID_BASE_DIR + `/workspace` + name + ` + TARGET_DIR = ` + proto.CID_BASE_DIR + `workspace/` + name + ` if [ ! -d $TARGET_DIR ]; then git clone ` + cid.Url + ` - cd $TARGET_DIR/` + name + ` + cd $TARGET_DIR else - cd $TARGET_DIR/` + name + ` + cd $TARGET_DIR git pull fi ` + cid.Script @@ -194,12 +194,12 @@ func CIDCallback(c *gin.Context) { names := strings.Split(name, ".") name = names[0] scriptContent := `#!/bin/bash - TARGET_DIR = ` + proto.CID_BASE_DIR + `/workspace` + name + ` + TARGET_DIR = ` + proto.CID_BASE_DIR + `workspace/` + name + ` if [ ! -d $TARGET_DIR ]; then git clone ` + res.Url + ` - cd $TARGET_DIR/` + name + ` + cd $TARGET_DIR else - cd $TARGET_DIR/` + name + ` + cd $TARGET_DIR git pull fi ` + res.Script