flutter_flutter/sky/tools/copy_dir.py
Adam Barth 7af714532d Make iOS Flutter apps extensible (#2654)
This patch switches us to building Runner.app on the end-developer's machine,
which will eventually let them customize their app.
2016-05-06 11:16:04 -07:00

40 lines
820 B
Python

#!/usr/bin/env python
# Copyright 2016 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.
import argparse
import subprocess
import shutil
import sys
import os
def MakeStamp(stamp_path):
dir_name = os.path.dirname(stamp_path)
if not os.path.isdir(dir_name):
os.makedirs()
with open(stamp_path, 'a'):
os.utime(stamp_path, None)
def main():
parser = argparse.ArgumentParser(description='Copy a directory')
parser.add_argument('--src', type=str)
parser.add_argument('--dst', type=str)
parser.add_argument('--stamp', type=str)
args = parser.parse_args()
shutil.rmtree(args.dst, True)
shutil.copytree(args.src, args.dst)
MakeStamp(args.stamp)
if __name__ == '__main__':
sys.exit(main())