Re: [PATCH] Don't use cpio in git-clone when not installed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds <torvalds <at> linux-foundation.org> writes:

> 
> 
> On Wed, 31 Oct 2007, Mike Hommey wrote:
> > +	if type cpio > /dev/null 2>&1; then
> > +		local=yes
> > +	fi
> 
> Isn't "type" a bashism?

ksh also has type. But SUS states, that "command -v" can be used.

   Options

[...]

   -v
       (On systems supporting the User Portability Utilities option.)
       Write a string to standard output that indicates the pathname or
       command that will be used by the shell, in the current shell
       execution environment (see Shell Execution Environment ), to
       invoke command_name, but do not invoke command_name.

           * Utilities, regular built-in utilities, command_names
             including a slash character, and any implementation-defined
             functions that are found using the PATH variable (as
             described in Command Search and Execution ), shall be
             written as absolute pathnames.

           * Shell functions, special built-in utilities, regular
             built-in utilities not associated with a PATH search, and
             shell reserved words shall be written as just their names.

           * An alias shall be written as a command line that represents
             its alias definition.

           * Otherwise, no output shall be written and the exit status
             shall reflect that the name was not found.

Regards,
Alexander



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux