Use cut command for portability

This commit is contained in:
Lealem Amedie
2025-12-11 17:04:22 -07:00
parent 7e26bc06c5
commit afa56497a8
2 changed files with 2 additions and 2 deletions

View File

@@ -673,7 +673,7 @@ if [ "$DOCONFIGURE" = "yes" ]; then
if [ -s wolfcrypt/src/fips_test.c ]; then
OUT=$(./wolfcrypt/test/testwolfcrypt | sed -n 's/hash = \(.*\)/\1/p')
NEWHASH="${OUT:0:64}"
NEWHASH=$(echo "$OUT" | cut -c1-64)
if [ -n "$NEWHASH" ]; then
cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak
sed "s/^\".*\";/\"${NEWHASH}\";/" wolfcrypt/src/fips_test.c.bak > \

View File

@@ -13,7 +13,7 @@ then
fi
OUT=$(./wolfcrypt/test/testwolfcrypt | sed -n 's/hash = \(.*\)/\1/p')
NEWHASH="${OUT:0:64}"
NEWHASH=$(echo "$OUT" | cut -c1-64)
if test -n "$NEWHASH"
then
cp wolfcrypt/src/fips_test.c wolfcrypt/src/fips_test.c.bak