Re: "install" running recursively..?
> Alexander Koch wrote:
> > I have a source which has "samples/admin/" as a dir.
> > Now I want to have a simple
> > install -m 644 samples/* $(tmp)/usr/doc/$(pkg)/examples
> > without touching the admin/ subdir at all.
> >
> > All I get is:
> > |install: `samples/adm' is a directory
> > |make: *** [binary-arch] Error 1
> >
> > Any hints? How to make that one recursively?
>
> I doubt if `install' can be tought to work recursively, but you could do
> something like this:
>
> for file in `find samples -type f`; do \
> install -m 644 file $(tmp)/usr/doc/$(pkg)/examples; \
> done
>
> which should do the trick as well (I didn't test it :/ ).
Assuming that this is in a Makefile (as hinted by $(pkg), you want
this to read (remembering initial tabs):
for file in `find samples -type f`; do \
install -m 644 $$file $(tmp)/usr/doc/$(pkg)/examples; \
done
with a *double* dollar before file.
Julian
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
Debian GNU/Linux Developer. jdg@debian.org
-*- Finger jdg@master.debian.org for my PGP public key. -*-
Reply to: