Commit a712c90c by sikang

update script

parent 8a6d859d
......@@ -6,6 +6,12 @@ import glob, os
import sys
def getResValue(line):
return line.split(",")[2].replace("'","").replace(" ","").replace(")","").replace("'\n","")
def addToProperties(line):
os.system("./update_properties.py "+line)
def move_config(path):
# print("processing content: %s..." % path)
with open(path, "r", encoding="utf-8") as f:
......@@ -21,9 +27,16 @@ def move_config(path):
if move_finished >1:
break
if "LANGUAGE" in line:
if "//" in line:
line = ""
else:
addToProperties("language="+getResValue(line))
line = "\t\t\tresValue('color', 'main_color', \"${language}\")\n"
if "'color', 'main_color'" in line:
color = line.split(",").replace("'","").replace(" ","").replace(")","").replace("'\n","")
line = line.replace("resValue('color', 'main_color', \"${main_color}\")\n")
addToProperties("main_color="+getResValue(line))
line = "\t\t\tresValue('color', 'main_color', \"${main_color}\")\n"
f_w.write(line)
return
......
......@@ -14,7 +14,7 @@ with open(path, "r", encoding="utf-8") as f:
with open(path, "w", encoding="utf-8") as f_w:
for line in lines:
if code in line:
line = ""
if "org.gradle.jvmargs" in line:
line = "#"+line
if "#MARK-END" in line:
line = code + "\n" + line
f_w.write(line)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment