Created
June 13, 2017 09:17
-
-
Save nigelbabu/5d69e17d88b881b24b3b6078eef56c00 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from fnmatch import fnmatch | |
import sys | |
matched = False | |
with open('.testignore') as ignore: | |
for pattern in ignore: | |
if fnmatch(sys.argv[2], pattern.strip()): | |
matched = True | |
break | |
if matched: | |
sys.exit(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment