Skip to content
Snippets Groups Projects
Commit 8aab70a2 authored by Nico Dechesne (Stage)'s avatar Nico Dechesne (Stage)
Browse files

signlk: fixup parsing of 'du'


'du' utility from coreutils uses TAB for delimiter, not SPACE, make the parsing
more robust.

Signed-off-by: default avatarNicolas Dechesne <nicolas.dechesne@linaro.org>
parent 568e4cf7
Branches 64bit
No related tags found
No related merge requests found
......@@ -159,12 +159,12 @@ openssl x509 -in $tmpdir/atte_cert.PEM -inform PEM -outform DER > $ATT 2>/dev/nu
openssl pkeyutl -sign -inkey $tmpdir/atte_key.PEM -in $CODE > $SIG 2>/dev/null
data_file_size=$( cut -d ' ' -f 1 <<< $(du -b $DATA) )
code_file_size=$( cut -d ' ' -f 1 <<< $(du -b $CODE) )
sig_file_size=$( cut -d ' ' -f 1 <<< $(du -b $SIG) )
atte_file_size=$( cut -d ' ' -f 1 <<< $(du -b $ATT) )
root_file_size=$( cut -d ' ' -f 1 <<< $(du -b $ROOT) )
hash_seg_file_size=$( cut -d ' ' -f 1 <<< $(du -b $tmpdir/hashSeg) )
data_file_size=$( cut -d ' ' -f 1 <<< $(du -b $DATA | tr '[:blank:]' ' '))
code_file_size=$( cut -d ' ' -f 1 <<< $(du -b $CODE | tr '[:blank:]' ' ') )
sig_file_size=$( cut -d ' ' -f 1 <<< $(du -b $SIG | tr '[:blank:]' ' ') )
atte_file_size=$( cut -d ' ' -f 1 <<< $(du -b $ATT | tr '[:blank:]' ' ') )
root_file_size=$( cut -d ' ' -f 1 <<< $(du -b $ROOT | tr '[:blank:]' ' ') )
hash_seg_file_size=$( cut -d ' ' -f 1 <<< $(du -b $tmpdir/hashSeg | tr '[:blank:]' ' ') )
hash_seg_offset=4096
mi_hdr_size=40
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment