coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] md5sum,b2sum,sha*sum: support -s option


From: Pádraig Brady
Subject: Re: [PATCH] md5sum,b2sum,sha*sum: support -s option
Date: Sun, 24 Jun 2018 21:17:57 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 24/06/18 20:23, Carlos Santos wrote:
>> From: "Pádraig Brady" <address@hidden>
>> To: "DATACOM" <address@hidden>, "Coreutils" <address@hidden>
>> Sent: Monday, June 25, 2018 12:09:28 AM
>> Subject: Re: [PATCH] md5sum,b2sum,sha*sum: support -s option
> 
>> On 24/06/18 20:00, Carlos Santos wrote:
>>> Add an alias to --status matching the "-s" option recognized by BusyBox.
>>> It helps to interchange scripts between full-fledged Linux distributions
>>> and embedded systems on which BusyBox is used instead of coreutils.
>>
>> It looks like busybox doesn't support any long options?
> 
> Right.
> 
>> Why is this one in particular important?
> 
> I stumbled on it when attempted to write a script that uses sha256sum
> and needs to work both on Fedora 7 and on an embedded system built with
> Buildroot. It's necessary to test where sha256sum comes from and use a
> variable for the status argument:
> 
>     if sha256sum --help 2>&1 | fgrep -q BusyBox; then
>         s_arg="-s" # BusyBox
>     else
>         s_arg="--status" # coreutils
>     fi
>     echo "${checksum}  ${img_file}" | sha256sum -c "${s_arg}" -w
> 

-s was removed a long time ago
https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=FILEUTILS-3_12a-7-g7823351

One disadvantage of adding it back is that scripts written say on Fedora 29
could then fail if ported elsewhere.

Now we did recently add -w, so adding -s would make busybox
a strict subset of coreutils, which would be desirable.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]