Move Android PNG drawables from java_staging directory to java directory
BUG=497470
TEST=None
The following script was used to generate this CL:
import subprocess
import os
import sys
def get_all_pngs(top):
all_files = set()
for root, dir_names, file_names in os.walk(top):
for file_name in file_names:
if file_name.endswith(".png"):
all_files.add(os.path.join(root, file_name))
return all_files
src_root_path = "chrome/android/java_staging/res"
dst_root_path = "chrome/android/java/res"
paths = get_all_pngs(src_root_path)
for path in paths:
rel_path = os.path.relpath(path, src_root_path)
new_path = os.path.join(dst_root_path, rel_path)
if os.path.exists(new_path):
print "File exists " + new_path
sys.exit(0)
dir = os.path.dirname(new_path)
if not os.path.exists(dir):
os.makedirs(dir)
os.rename(path, new_path)
subprocess.call(["git", "add", new_path])
R=tedchoc@chromium.org
Review URL: https://codereview.chromium.org/
1166313002.
Cr-Commit-Position: refs/heads/master@{#333425}