[arch-general] PKGBUILD: mkdir or install?

Dieter Plaetinck dieter at plaetinck.be
Mon Apr 6 09:58:04 EDT 2009


On Mon, 06 Apr 2009 15:29:25 +0200
Jan de Groot <jan at jgc.homeip.net> wrote:

> On Mon, 2009-04-06 at 15:25 +0200, Ali H. Caliskan wrote:
> > Hello fellow Arch Linux devels and users,
> > 
> > I'm wondering if it's inappropriate to use "mkdir -p" in PKGBUILD
> > instead of "install". I've seen quite many official PKGBUILDs that
> > use mkdir instead of install, whose very structure I've adopted and
> > applied in my various PKBUILDs. Does it matter if it's mkdir or
> > install, and why?
> > 
> > Kind regards,
> > Ali
> 
> Usually it doesn't matter, but I prefer to use install -d instead of
> mkdir. Some users like to have umask set to something completely
> non-default, which breaks permissions with mkdir -p. With install
> -m755 -d I can specifiy the correct permissions explicit instead of
> hoping the user doesn't have umask set.
> 

A workaround would be to chmod afterwards.
But I also prefer to use install. (one command instead of 2)

Dieter


More information about the arch-general mailing list