I've got a makefile rule that builds a zip/tarbar for distribution. In the recipe, it does some "value added" things, like ensure CR/LF's are correct, and ensures execute bits are correct before packaging.
The project has a buffet of files, but here are the requirements: (1) all files except
LF only, (3) all files except
Here's what the recipe looks like:
.PHONY: convert convert: chmod a-x *[^GNUmakefile*] TestData/*.dat TestVectors/*.txt unix2dos --keepdate --quiet *[^GNUmakefile*] TestData/*.dat TestVectors/*.txt dos2unix --keepdate --quiet GNUmakefile
* and trying to avoid explicitly listing all the files in the buffet because some are non obvious, like IDE specific files. (
*[^<somefile>*] is a neat trick; I got that from Exclude one pattern from glob match).
The problem is I'm matching
TestVectors when performing
chmod a-x, so I exclude myself from the directories.
I need to refine things, but I'm not sure how. I want to use the shell's "*" glob, but exclude one file and don't match directories.
How should I proceed?