blob: 93ad0c99d111f8d54de8773e7507520f77520160 [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2019 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 os
import shutil
import sys
samples_pages = [
other_pages = [
copy_folders = [
def make_ot_samples_folder(source, dest):
for f in samples_pages:
shutil.copy(os.path.join(source, f), dest)
for f in other_pages:
shutil.copy(os.path.join(source, f), dest)
for f in copy_folders:
shutil.copytree(os.path.join(source, f), os.path.join(dest, f))
os.path.join(source, 'index.published.html'),
os.path.join(dest, 'index.html'))
shutil.make_archive('source', 'zip', dest)
shutil.move('', dest)
# media folder won't be included in the zip file or uploaded in any way as
# part of this process
shutil.copytree(os.path.join(source, 'media'), os.path.join(dest, 'media'))
def main():
make_ot_samples_folder(sys.argv[1], sys.argv[2])
if __name__ == '__main__':