Commit 0f4bc330 by sikang

update script

parent b6315f89
......@@ -37,7 +37,7 @@ def create_desc(read_path,write_path):
with open(read_path, "r") as f:
lines = f.readlines()
search_str = "-@Example " + str(random.randint(0, 18)) + "-"
search_str = "-@Example " + str(random.randint(0, 17)+1) + "-"
is_target = False
print (search_str)
print (sys.argv[1])
......@@ -60,4 +60,21 @@ def create_desc(read_path,write_path):
f_w.write(line)
create_desc("/Users/connor/StudioProjects/WorkSpace/app_desc.txt","/Users/connor/Documents/apks/"+sys.argv[5]+"_desc.txt")
def create_config(read_path,write_path):
with open(read_path, "r") as f:
lines = f.readlines()
with open(write_path, "w") as f_w:
for line in lines:
line = line.replace("${app_name}",sys.argv[1])\
.replace("${desc}",sys.argv[5]+"_desc.txt")\
.replace("${privacy_url}",sys.argv[6])
f_w.write(line)
output = "/Users/connor/Documents/apks/"+sys.argv[5]+sys.argv[1];
if not os.path.exists(output):
os.makedirs(output)
create_desc("/Users/connor/StudioProjects/WorkSpace/app_desc.txt",output+"/"+sys.argv[5]+"_desc.txt")
create_config("/Users/connor/StudioProjects/WorkSpace/config.json",output+"/config.json")
\ No newline at end of file
......@@ -256,7 +256,7 @@ elif (($commod == '26'));then
echo "对内协议:${agreement_url}"
echo "对外协议:${home}/privacy.html"
cd print
python create_desc.py "${app_name}" "${cus_email}" "${hot_line}" "${cus_adress}" "${corp_id}"
python create_desc.py "${app_name}" "${cus_email}" "${hot_line}" "${cus_adress}" "${corp_id}" "${home}/privacy.html"
echo " "
elif (($commod == '10000'))
......
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