[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dealing with executable shell scripts
From: |
Nick Bowler |
Subject: |
Re: dealing with executable shell scripts |
Date: |
Tue, 20 Mar 2012 11:04:00 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2012-03-20 16:01 +0200, Andrew W. Nosenko wrote:
> On Tue, Mar 20, 2012 at 15:47, Nick Bowler <address@hidden> wrote:
[...]
> > SUFFIXES = .sh
> >
> > .sh:
> > $(shbin_verbose) cp $< address@hidden
> > $(AM_V_at) chmod +x address@hidden
> > $(AM_V_at) mv -f address@hidden $@
> >
>
> Why do not use install(1) instead of cp(1)+chmod(1) or cp(1)+chmod(1)+mv(1)?
Unfortunately, use of the install tool is not portable (it's not even in
POSIX). However, automake-using packages provide a replacement on
systems where a working install tool is not available.
Therefore, in this instance, you could alternately use a single call to
$(INSTALL) (which gets set appropriately by AC_PROG_INSTALL) instead of
the 3-command dance above.
On the other hand, install ignores the process umask (unlike the above),
which is appropriate when installing files to the system, but may not be
suitable for files the build tree.
Cheers,
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
- Re: dealing with executable shell scripts, (continued)
- Re: dealing with executable shell scripts, Miles Bader, 2012/03/22
- Re: dealing with executable shell scripts, NightStrike, 2012/03/22
- Re: dealing with executable shell scripts, Miles Bader, 2012/03/22
- Re: dealing with executable shell scripts, Nick Bowler, 2012/03/22
- Re: dealing with executable shell scripts, NightStrike, 2012/03/21
Re: dealing with executable shell scripts, Nick Bowler, 2012/03/20