diff options
Diffstat (limited to 'scripts/sstate-cache-management.py')
-rwxr-xr-x | scripts/sstate-cache-management.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/sstate-cache-management.py b/scripts/sstate-cache-management.py index d3f600bd28..303b8f13a3 100755 --- a/scripts/sstate-cache-management.py +++ b/scripts/sstate-cache-management.py | |||
@@ -268,6 +268,10 @@ def parse_arguments(): | |||
268 | # ) | 268 | # ) |
269 | 269 | ||
270 | parser.add_argument( | 270 | parser.add_argument( |
271 | "-n", "--dry-run", action="store_true", help="Don't execute, just go through the motions." | ||
272 | ) | ||
273 | |||
274 | parser.add_argument( | ||
271 | "-y", | 275 | "-y", |
272 | "--yes", | 276 | "--yes", |
273 | action="store_true", | 277 | action="store_true", |
@@ -314,6 +318,9 @@ def main(): | |||
314 | if args.debug >= 1: | 318 | if args.debug >= 1: |
315 | print("\n".join([str(p.path) for p in remove])) | 319 | print("\n".join([str(p.path) for p in remove])) |
316 | print(f"{len(remove)} out of {len(paths)} files will be removed!") | 320 | print(f"{len(remove)} out of {len(paths)} files will be removed!") |
321 | if args.dry_run: | ||
322 | return 0 | ||
323 | |||
317 | if not args.yes: | 324 | if not args.yes: |
318 | print("Do you want to continue (y/n)?") | 325 | print("Do you want to continue (y/n)?") |
319 | confirm = input() in ("y", "Y") | 326 | confirm = input() in ("y", "Y") |