commit 05594ba5c50d7a7b10882b9504d75bdd5df348a3 from: Christian Weisgerber date: Wed Jan 18 16:14:48 2023 UTC regress: replace typeset with printf for shell portability The typeset shell builtin is a ksh(1) feature. It is not available in a pure POSIX sh(1). Use printf(1) to portably perform the same string truncation. tweak and ok op jamsek commit - f9550d472ec2151070b5bef2bd3b950d9f8e7949 commit + 05594ba5c50d7a7b10882b9504d75bdd5df348a3 blob - 34b8116a11c50dad2f634dc6fe4dcea09570a334 blob + 68fc40572b1afa42c02409a2836ca23e2d7df464 --- regress/cmdline/diff.sh +++ regress/cmdline/diff.sh @@ -1762,10 +1762,8 @@ EOF return 1 fi - typeset -L10 short_alpha_id - typeset -L10 short_alpha_new_id - short_alpha_id=$alpha_blobid - short_alpha_new_id=$alpha_new_blobid + short_alpha_id=$(printf '%.10s' $alpha_blobid) + short_alpha_new_id=$(printf '%.10s' $alpha_new_blobid) cat <$testroot/stdout.expected diffstat $alpha_blobid $alpha_new_blobid M $short_alpha_id -> $short_alpha_new_id | 1+ 1-