Re: more fancy ignoring of files ('if' in .gitignore?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/27/2009 10:30 AM, Sebastian Schubert wrote:
Hi,

I would like to ignore files if certain other files are present. In my
special case, I want to ignore foo.pdf and foo.eps if foo.fig is
present (both pdf and eps are generated on the fly but don't belong
into repository). In general, I do NOT want to ignore pdf or eps. There
are a lot of foos so I would like to have a general solution.

Is this possible?

I suggesting adding to your makefile a rule like

.gitignore: $(wildcard *.fig)
	(grep -ve \.pdf$ \.eps$ .gitignore;
	for i in $^; do echo $i; done | \
		sed -n 's/fig$/eps/p; s/eps$/pdf/p') > .gitignore.tmp
	mv .gitignore.tmp .gitignore

Paolo
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]