'/server/project/shine': '/server/project/shine', #server toolProject '/server/toolProject/shine8': '/server/toolProject/shine8', '/server/toolProject/shineTool': '/server/toolProject/shineTool', '/server/toolProject/commonTool': '/server/toolProject/commonTool', #server tools '/server/tools': '/server/tools', #toolsMac '/server/toolsMac/jar/tools.jar': '/server/tools/jar/tools.jar', } if shine.is_admin(): os.chdir(os.path.dirname(os.getcwd())) corePath = shine.input_path("请输入core目录的路径") n = len(corePath) if corePath[n - 4:n] != "core": print("must input corePath!!") else: if not os.path.isdir(corePath): print("corePath is not exist") else: rootPath = os.getcwd() if not os.path.exists(rootPath + '/server/toolsMac/jar'): os.mkdir(rootPath + '/server/toolsMac/jar') shine.link_dir(pathDic, corePath, rootPath)
svn(cmd) def externals(dic, dir, path): cmd = 'propset svn:externals -F "' tf = open(tempPath, 'w') for key in dic: #print(path + key, file=tf) tf.write(path + key + separator) tf.close() cmd += tempPath + '" "' + dir + '"' svn(cmd) if __name__ == '__main__': input("执行前请确保已执行deleteLink, 按Enter键继续......") corePath = shine.input_path("输入homeCore的svn地址,如(svn://xxx.com/home/core或者^/home/core)") if not corePath.startswith("svn") or corePath.startswith("^"): input('svn路径输入错误') sys.exit(1) localPath = os.getcwd() comment = 'first' os.chdir(os.path.dirname(os.getcwd())) os.chdir(os.path.dirname(os.getcwd())) if os.path.exists(tempPath): os.remove(tempPath) svn('propset svn:global-ignores -F "' + localPath + '/svnProps/game_ignore.txt" "."') add('art')