In order to make "installation" of my OS into a disk image simpler, I've decided to make a little package system. Basically each component creates a tarball of itself which is unpacked in the root of my OS's file system.
I'm having problems building the tarball's so that they exclude .svn dir's. Mainly problems with the 'find' command. In my makefile I have the line:
Code: Select all
PKGFILES := $(shell cd package && find -mindepth 1 \! \( -name '.svn' -prune \) -print)
which is supposed to find all the files in the package directory excluding anything related to svn. Later I have:
Code: Select all
dist:
@tar czf fluidium.pkg.tgz -C package $(PKGFILES)
Which actually creates the package. The problem is that only the .svn directories in the first level are excluded. .svn directories in the second and third levels remain in the tarball. Would someone mind giving me a clue as to how to get the "\( -name '.svn' -prune \)" to apply to more than just the first level directory?
Also, for some reason this method makes it so that the first directory in the archive is simply ".". This really isn't a problem because it expands properly to "./*" when unpacked but it is an annoyance.