summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/build/cipd/clobber_cipd_root.py
blob: 5d36c72239f848547b4fc69b3656e3bcf2734869 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
#
# Copyright 2018 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.

"""Clobbers a CIPD root."""

import argparse
import os
import shutil
import sys


def main():
  parser = argparse.ArgumentParser(
      description='Clobbers the CIPD root in the given directory.')

  parser.add_argument(
      '--root',
      required=True,
      help='Root directory for dependency.')
  args = parser.parse_args()

  cipd_root_dir = os.path.join(args.root, '.cipd')
  if os.path.exists(cipd_root_dir):
    shutil.rmtree(cipd_root_dir)

  return 0


if __name__ == '__main__':
  sys.exit(main())