TheChymera / mkstage4

Bash Utility for Creating Stage 4 Tarballs
GNU General Public License v3.0
104 stars 22 forks source link

Add -i option to include files prior to exclusion #30

Closed lucianposton closed 4 years ago

lucianposton commented 4 years ago

Adds an -i FILE option to include files within directories excluded by -e or the built-in default exclusion list.

In case it isn't clear, the INCLUDES var was added so that later default includes can be included e.g. files in /var/log that have been excluded that cause qcheck to fail.

lucianposton commented 4 years ago

I added some tests. This is ready.

TheChymera commented 4 years ago

I think it would be best if you would highlight in the help text that the includes are meant to override the excludes. “Prior to exclusion” makes it sound like it doesn't.

lucianposton commented 4 years ago
-   -i: an additional targets to include prior to exclusion by -e and default list.\n\
+   -i: an additional targets to include. These have higher precedence than -e, -t, and -s.\n\

How's that?

I'm leaning away from override because that's not exactly how tar handles it. tar simply does what comes first on the command line, and since all the -i go before the -e when we build the final tar command, it seemed to make the most sense to communicate that. I might have lost some perspective from too much time reading tar docs in order to figuring this out though. :)

Let me know if there is something specific you'd rather have in the help text.

TheChymera commented 4 years ago

@lucianposton sorry for being grammatically nitpicking, but it should be either “additional targets” or “an additional target [...] This has”, depending on whether list input is supported or not.

lucianposton commented 4 years ago

fixed those mistakes

TheChymera commented 4 years ago

amazing, thanks!