| Index: scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
|
| diff --git a/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py b/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
|
| index 568d574ab5d8e1bf585beb8a0202af8d6c088096..6450983fac6e4e10667d55db8087bd506936f4db 100755
|
| --- a/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
|
| +++ b/scripts/slave/recipe_modules/webrtc/resources/cleanup_symlinks.py
|
| @@ -12,24 +12,21 @@ import sys
|
|
|
| def main(args):
|
| if len(args) != 1:
|
| - print >> sys.stderr, 'Please specify a single directory as an argument.'
|
| + print >> sys.stderr, ('Please specify a single directory as an argument, '
|
| + 'which points to the checkout root (dir above src/).'
|
| return 1
|
|
|
| - checkout_dir = args[0]
|
| - if not os.path.isdir(checkout_dir):
|
| - print 'Cannot find any directory at %s. Skipping cleaning.' % checkout_dir
|
| + checkout_root = args[0]
|
| + if not os.path.isdir(checkout_root):
|
| + print 'Cannot find any directory at %s. Skipping cleaning.' % checkout_root
|
| return 0
|
|
|
| - setup_links_file = os.path.join(checkout_dir, 'setup_links.py')
|
| - if not os.path.isfile(setup_links_file):
|
| - print 'Cannot find %s. Incomplete checkout?' % setup_links_file
|
| - return 1
|
| - else:
|
| - print 'Cleaning up symlinks in %s' % checkout_dir
|
| + setup_links_file = os.path.join(checkout_root, 'src', 'setup_links.py')
|
| + if os.path.isfile(setup_links_file):
|
| + print 'Cleaning up symlinks in %s' % checkout_root
|
| subprocess.check_call([sys.executable, setup_links_file, '--clean-only'],
|
| - cwd=checkout_dir)
|
| - return 0
|
| -
|
| + cwd=checkout_root)
|
| + return 0
|
|
|
|
|
| if __name__ == '__main__':
|
|
|