Skip to content

Instantly share code, notes, and snippets.

@Fusion86
Created January 2, 2018 22:45
Show Gist options
  • Save Fusion86/4d394d77f2841b0aeaf23ed7300bf403 to your computer and use it in GitHub Desktop.
Save Fusion86/4d394d77f2841b0aeaf23ed7300bf403 to your computer and use it in GitHub Desktop.
import glob
f = open(".stignore", "w")
for filepath in glob.iglob("**/.stignore", recursive=True):
# Ignore top-level .stignore, because that is the one we are generating
if filepath != ".stignore":
unixpath = filepath.replace('\\', '/') # Use Unix like filepaths
f.write(f"#include {unixpath}\n")
print(f"Added '{unixpath}' to the ignore file")
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment