[PATCH] D83411: Use md5 -q for HashProgramOutput.sh, to show only the checksum.

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 05:45:15 PDT 2020


serge-sans-paille added inline comments.


================
Comment at: HashProgramOutput.sh:23
 else
     $md5cmd < $1.bak | cut -d' ' -f 1 > $1
 fi
----------------
dim wrote:
> serge-sans-paille wrote:
> > Why no silencing that one too?
> With the BSD (and macOS) `md5` command, the `-q` option is not really "silencing", but it prints out only the checksum in that case:
> 
> ```
>      -q      Quiet mode - only the checksum is printed out.  Overrides the -r option.
> ```
> 
> GNU coreutils `md5sum` does not have an equivalent option: you must always parse the standard output, and take the first printed field as the checksum.
> 
> Note that GNU `md5sum` indeed has a `--quiet` option, but its meaning is rather different: it can only be used in `--check` mode, and then its effect is that it does not show `OK` for each correctly verified input file.
> 
Then your change will make `md5sum` fail when the GNU version is used? I must be missing something :-)


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83411/new/

https://reviews.llvm.org/D83411



More information about the llvm-commits mailing list