Skip to content

Commit afa5649

Browse files
committed
Use cut command for portability
1 parent 7e26bc0 commit afa5649

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fips-check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ if [ "$DOCONFIGURE" = "yes" ]; then
673673

674674
if [ -s wolfcrypt/src/fips_test.c ]; then
675675
OUT=$(./wolfcrypt/test/testwolfcrypt | sed -n 's/hash = \(.*\)/\1/p')
676-
NEWHASH="${OUT:0:64}"
676+
NEWHASH=$(echo "$OUT" | cut -c1-64)
677677
if [ -n "$NEWHASH" ]; then
678678
cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak
679679
sed "s/^\".*\";/\"${NEWHASH}\";/" wolfcrypt/src/fips_test.c.bak > \

fips-hash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ then
1313
fi
1414

1515
OUT=$(./wolfcrypt/test/testwolfcrypt | sed -n 's/hash = \(.*\)/\1/p')
16-
NEWHASH="${OUT:0:64}"
16+
NEWHASH=$(echo "$OUT" | cut -c1-64)
1717
if test -n "$NEWHASH"
1818
then
1919
cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak

0 commit comments

Comments
 (0)