A utility to combine .stignore
files under every folder together into one file and correct paths in them, since Syncthing does not support ignore file recursive lookup like Git.
./subfolder1/.stignore:
#include template.txt
!(?i)/build/CMakeCache.txt
(?i)/build
*.obj
./subfolder2/.stignore:
(?d).DS_Store
(?d).localized
(?d)._*
(?d).Icon*
(?d).fseventsd
(?d).Spotlight-V100
(?d).DocumentRevisions-V100
(?d).TemporaryItems
(?d).Trashes
(?d).Trash-1000
(?d).iCloud
./.stignore.gen (output):
/// subfolder1/.stignore
#include subfolder1/template.txt
!(?i)/subfolder1/build/CMakeCache.txt
(?i)/subfolder1/build
*.obj
/// subfolder2/.stignore
(?d).DS_Store
(?d).localized
(?d)._*
(?d).Icon*
(?d).fseventsd
(?d).Spotlight-V100
(?d).DocumentRevisions-V100
(?d).TemporaryItems
(?d).Trashes
(?d).Trash-1000
(?d).iCloud
./.stignore (output):
#include .stignore.global
#include .stignore.gen
-
Use dotnet-script:
dotnet script .stignore.gen.csx
-
If you have Visual Studio with C# workflow installed:
-
Add
(VSInstallationPath)/MSBuild/Current/Bin/Roslyn
toPATH
environment variable,
then runcsi .stignore.gen.csx
-
Copy-and-paste code to a C# project, build and run as an executable.
-