diff --git a/build.py b/build.py index 3dc73a11d8d8ab9a3e97d243a3ab0284c5fc9cd6..f08cba548fb0eb227e21cd7c2036f2cbf3dc0c2f 100755 --- a/build.py +++ b/build.py @@ -426,6 +426,12 @@ def run_uninstall(args): ] execute_script(UNINSTALL_LRC) + +def run_clean(): + execute_script(['git clean -xfdd', + 'git submodule foreach git clean -xfdd']) + + def run_run(args): if args.distribution == OSX_DISTRIBUTION_NAME: subprocess.Popen( @@ -575,6 +581,10 @@ def parse_args(): ga.add_argument( '--install', action='store_true', help='Build and install Ring') + ga.add_argument( + '--clean', action='store_true', + help='Call "git clean" on every repository of the project' + ) ga.add_argument( '--uninstall', action='store_true', help='Uninstall Ring') @@ -649,6 +659,8 @@ def main(): elif parsed_args.init: run_init() + elif parsed_args.clean: + run_clean() elif parsed_args.install: run_install(parsed_args)