Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os by
find_duplicates.py
00001 from os import walk 00002 from os.path import join, abspath, dirname, basename, splitext 00003 import sys 00004 00005 ROOT = abspath(join(dirname(__file__), "..", "..")) 00006 sys.path.insert(0, ROOT) 00007 00008 from tools.toolchains.gcc import GCC_ARM 00009 from tools.targets import TARGET_MAP 00010 from argparse import ArgumentParser 00011 00012 if __name__ == "__main__": 00013 parser = ArgumentParser("Find duplicate file names within a directory structure") 00014 parser.add_argument("dirs", help="Directories to search for duplicate file names" 00015 , nargs="*") 00016 parser.add_argument("--silent", help="Supress printing of filenames, just return number of duplicates", action="store_true") 00017 args = parser.parse_args() 00018 00019 toolchain = GCC_ARM(TARGET_MAP["K64F"]) 00020 00021 resources = sum([toolchain.scan_resources(d) for d in args.dirs], None) 00022 00023 scanned_files = {} 00024 00025 exit(resources.detect_duplicates(toolchain)) 00026
Generated on Tue Jul 12 2022 13:15:49 by
