[2010-05-29 18:15] Kris Maglione <maglion...@gmail.com> > On Sat, May 29, 2010 at 11:56:26PM +0200, markus schnalke wrote: > >[2010-05-29 23:46] Moritz Wilhelmy <c...@wzff.de> > >> > Very often I see makefile use install(1) when cp, mkdir, chmod, and > >> > Co. would be equally compact. > >> > >> Consider > >> > >> install -D -m755 -u foo -g bar foo.sh $DESTDIR/usr/bin > >> > >> vs. > >> > >> mkdir -p $DESTDIR/usr/bin > >> cp foo.sh $DESTDIR/usr/bin > >> chmod 755 $DESTDIR/usr/bin/foo.sh > >> chown foo:bar $DESTDIR/usr/bin/foo.sh > >> > >> and tell me about "equally compact" again... > > > >I know about such cases, but this is not the common case, at least as > >far as I've seen it. > > > > > >You mean, install is just meant as a wrapper around the standard tools > >to express the actions in a more compact way. (btw: It's a shame that > >install isn't a shell script then.) > > But it is the common case. At the very least copying and setting > the permissions is the common case, mkdir is very common, and > the chown comes about often enough. When you have to install a > half dozen different files, it adds up. And it's definitely > nearly universally available (except on Plan 9) despite not > being defined by POSIX, but you're right about the > incompatibilities-though they don't really matter if you don't > try anything fancy.
Thanks for the explanations. meillo