On Sat, 09/09 17:08, Kamil Rytarowski wrote:
> >>> +submodules=$(git submodule foreach --recursive --quiet 'echo $name')
> >>> +
> >>> +if test -n "$submodules"; then
> >>> + {
> >>> + git ls-files
> >>> + for sm in $submodules; do
> >>> + (cd $sm; git ls-files) | sed "s:^:$sm/:"
> >>> + done
> >>> + } | grep -x -v $(for sm in $submodules; do echo "-e $sm"; done) >
> >>> $1.list
> >>
> >> Supporting '-e something' in a tar -T listfile seems to
> >> be GNU tar specific. Do we care?
> >
> > The "-e $sm" will go to the grep command line, so it isn't GNU specific, is
> > it?
> >
>
> BSD OSes use GNU grep(1) the latest version GPLv2. There is a work in
> progress BSD grep(1), but not turned on by default as it's slower.
>
> The -e option is supported by SmartOS grep(1).
Is there a more portable way to filter out multiple patterns?
Fam