Commit ee6261e8 authored by knn's avatar knn Committed by Commit bot

[Android][Cleanup] Remove temporary clobber scripts after r1062213002 removing...

[Android][Cleanup] Remove temporary clobber scripts after r1062213002 removing localized AppRestriction resources.

BUG=475515

Review URL: https://codereview.chromium.org/1151523003

Cr-Commit-Position: refs/heads/master@{#330738}
parent d30c42fc
......@@ -359,31 +359,12 @@
},
],
'actions': [
{
'action_name': 'remove_localized_resources',
'outputs': [
'<(input_resources_dir)/remove_localized_resources.d.stamp'
],
'inputs': [
'policy/tools/remove_localized_app_restrictions.py',
],
'action': [
'python',
'policy/tools/remove_localized_app_restrictions.py',
'<(input_resources_dir)',
],
},
{
'action_name': 'create_resources_zip',
'inputs': [
'<(create_zip_script)',
'<(input_resources_dir)/xml-v21/app_restrictions.xml',
'<(input_resources_dir)/values-v21/restriction_values.xml',
# A dummy stamp file to remove localized resources without
# clobbering the build.
# TODO(475515): Remove after all build bots have run
# 'remove_localized_resources' target.
'<(input_resources_dir)/remove_localized_resources.d.stamp',
],
'outputs': [
'<(resources_zip)'
......
#!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''python %prog resources_dir
resources_dir specifies the root directory of the localized app restrictions
resources to purge'''
import os
import re
import sys
def main(resources_dir):
match = re.compile('^values-.*-v21$')
for dir in os.listdir(resources_dir):
if match.search(dir):
path = os.path.join(resources_dir, dir)
os.remove(os.path.join(path, 'restriction_values.xml'))
os.rmdir(path)
open(os.path.join(resources_dir, 'remove_localized_resources.d.stamp'), 'w')
return 0
if __name__ == '__main__':
sys.exit(main(sys.argv[1]))
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