Thread (18 messages) flat view 18 messages, 12 authors, 2016-06-15

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

From: Alexander Skwar <hidden>
Date: 2016-06-15 22:43:46

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

On Wed, 31 Oct 2007, Mike Hommey wrote:
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help