git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
ASAlexander Skwar <listen@alexander.skwar.name>
Date
Nov 1, 2007, 13:06 UTC
Message-ID
<loom.20071101T130539-416@post.gmane.org>
In-Reply-To
<alpine.LFD.0.999.0710311742170.3342@woody.linux-foundation.org>
Linus Torvalds <torvalds <at> linux-foundation.org> writes:
Show 8 quoted lines
> 
> 
> 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

Previous: Mike HommeyNext: Nguyen Thai Ngoc Duy
Message 10 of 16 in “Don't use cpio in git-clone when not installed”
  1. Don't use cpio in git-clone when not installedMike Hommey, Oct 31, 2007
  2. Mike HommeyOct 31, 2007
  3. Junio C HamanoOct 31, 2007
  4. Johannes SchindelinOct 31, 2007
  5. Linus TorvaldsNov 1, 2007
  6. Jakub NarebskiNov 1, 2007
  7. Nguyen Thai Ngoc DuyNov 1, 2007
  8. Junio C HamanoNov 1, 2007
  9. Mike HommeyNov 1, 2007
  10. Alexander SkwarNov 1, 2007
  11. Nguyen Thai Ngoc DuyNov 1, 2007
  12. Junio C HamanoNov 1, 2007
  13. Nguyen Thai Ngoc DuyNov 1, 2007
  14. Junio C HamanoNov 1, 2007
  15. Mike HommeyNov 1, 2007
  16. Junio C HamanoNov 1, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.