Commit 93d01195 by sikang

update script

parent 4cefad9e
# -*-coding:utf-8-*-
import os
import sys
app_name = sys.argv[1]
permission_list = sys.argv[2]
input=sys.argv[3]
output = sys.argv[4]
def process_file_content():
# print("processing content: %s..."%path)
with open(input, "rt") as fin:
file_content = fin.read()
file_content = file_content.replace("${app_name}", app_name)
file_content = file_content.replace("${permission_list}", permission_list)
with open(output, "wt") as fout:
fout.write(file_content)
print("privacy done\n")
process_file_content()
\ No newline at end of file
......@@ -30,6 +30,7 @@ echo "25、马甲包切换"
echo "26、打印checklist"
echo "27、更换隐私协议"
echo "28、刷新本地协议"
echo "29、生成隐协议文件"
echo " "
if [[ "$app_name" == "$majia_name" ]];then
......@@ -295,7 +296,8 @@ elif (($commod == '26')) || (($commod == '266'));then
python create_desc.py "${app_name}" "${cus_email}" "${hot_line}" "${cus_adress}" "${corp_id}" "${home}/privacy.html" "${home}" ${code}
echo " "
file_name="${corp_id}_${app_name}"
mv /Users/connor/Documents/apks/"${file_name}.apk" /Users/connor/Documents/apks/"${file_name}/${file_name}.apk"
mv /Users/connor/Documents/apks/"${file_name}.apk" /Users/connor/Documents/apks/"${file_name}/app.apk"
mv /Users/connor/Documents/apks/"${file_name}.html" /Users/connor/Documents/apks/"${file_name}/privacy.html"
cp ../../../app/src/main/res/drawable-xxhdpi/logo.png /Users/connor/Documents/apks/"${file_name}/logo.png"
#elif (($commod == '27'));then
......@@ -304,7 +306,15 @@ elif (($commod == '26')) || (($commod == '266'));then
elif (($commod == '28'));then
cd privacy
python update_local.py "${agreement_url}"
permissions="1235"
if [ ${contact} != 'true' ];then
permissions="235";fi
file_name="${corp_id}_${app_name}"
python update_local.py "${agreement_url}" "${permissions}" "/Users/connor/Documents/apks/privacy/privacy0.html" "/Users/connor/Documents/apks/${file_name}.html"
elif (($commod == '29'));then
cd privacy
python new_privacy.py "${app_name}"
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