# -*-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()