aconfmgr
aconfmgr copied to clipboard
Add `AddPath`, which would un-ignore a subdirectory of an ignored directory
Add a new parameter to the configuration, that would enable adding select paths inside overall ignored ones.
For example,
To be able to backup /usr/lib/aconfmgr
, while ignoring everything else, like:
IgnorePath '/usr/lib'
AddPath '/usr/lib/aconfmgr'
Something similar to how gitignore file works
Unfortunately this is not easily possible, due to how file enumeration is currently done.
That is, You would need to extensively rewrite aconfmgr
to implement it?
It would mean reimplementing this block, however it could mean a massive performance decrease and a large increase in code complexity.
I guess it would be possible by making each AddPath
instance correspond to a find
invocation (i.e. there being an implicit AddPath /
), then ignore IgnorePath
rules which match the initial AddPath
.
While i cannot offer a pull request, I will surely test the feature if/when it is added.
I have added a wiki entry which provides a function that allows for whitelisting files: https://github.com/CyberShadow/aconfmgr/wiki/Whitelist-files
It basically finds everything that is not on your whitelist and ignores it. This allows for your usecase without a massiv rewrite of aconfmgr.
I'm assuming there hasn't been any progress made on this, just checking if I'm wrong. Not sure if my shell scripting skills are good enough for this, but I might consider looking into this myself as this would be super useful for me.