浏览代码

由于将builder.py和arg.json、fty.py放入编译路径中,所以删除时不能删除这三个文件。

Jeff 3 年之前
父节点
当前提交
ac21169f65
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      自动编译系统脚本标准化/builder.py

+ 5 - 3
自动编译系统脚本标准化/builder.py

@@ -117,10 +117,12 @@ def prev_compile():
     # 重新下载;
     # 重新下载;
     commands=[]
     commands=[]
     if PREV_ARG['redownload']:
     if PREV_ARG['redownload']:
-        commands.append(str.format("rm -rf %s") % CODE_DIR)
-        commands.append(str.format("cd %s") % os.getcwd())
-        commands.append(str.format("mkdir %s") % CODE_FOLDER_NAME)
         commands.append(str.format("cd %s") % CODE_DIR)
         commands.append(str.format("cd %s") % CODE_DIR)
+        commands.append(str.format("rm -rf !(%s|%s|%s|%s)") % ("builder.py", "arg.json", "51M-CompileScript.sh", "ftp.py"))
+        # 已在编译路径中,无须处理;
+        #commands.append(str.format("cd %s") % os.getcwd())
+        #commands.append(str.format("mkdir %s") % CODE_FOLDER_NAME)
+        #commands.append(str.format("cd %s") % CODE_DIR)
         commands.append(str.format("repo init -u %s") % (PREV_ARG['branch-addr']))
         commands.append(str.format("repo init -u %s") % (PREV_ARG['branch-addr']))
         commands.append("repo sync")   
         commands.append("repo sync")   
         commandline=';'.join(commands)
         commandline=';'.join(commands)