forked from OSchip/llvm-project
26 lines
703 B
Python
Executable File
26 lines
703 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
#===- make/filter-inputs ---------------------------------------------------===#
|
|
#
|
|
# The LLVM Compiler Infrastructure
|
|
#
|
|
# This file is distributed under the University of Illinois Open Source
|
|
# License. See LICENSE.TXT for details.
|
|
#
|
|
#===------------------------------------------------------------------------===#
|
|
|
|
# Given a list of files, return a new list of files taking only the
|
|
# first file for any particular filename.
|
|
def main():
|
|
import os,sys
|
|
|
|
seen = set()
|
|
for file in sys.argv[1:]:
|
|
base = os.path.basename(file)
|
|
if base not in seen:
|
|
seen.add(base)
|
|
print file
|
|
|
|
if __name__ == '__main__':
|
|
main()
|