Commit d960c68d by sikang

update script

parent 55ca1fbe
echo "1、同盾列表添加最少选择数量"
echo "2、gradle.properties 添加同盾开关"
echo -n "请输入指令编号:"
read commod
......@@ -7,4 +8,9 @@ if (($commod == '1'))
then
chmod a+x thirdpart_list.py
./thirdpart_list.py
elif (($commod == '2'))
then
chmod a+x update_properties.py
./update_properties.py 'td_mode=close'
fi
\ No newline at end of file
#!/usr/bin/env python3
import json
import string
import random
import glob, os
import sys
path = "../../../gradle.properties"
code = sys.argv[1]
with open(path, "r", encoding="utf-8") as f:
lines = f.readlines()
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 = 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