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