commit 71d196c9e2bffa978977785cd8859579e78bac24 from: Christian Weisgerber via: Thomas Adam date: Thu Jan 19 16:33:26 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 - 6110f5ef4a11d9157e87d91bb4adf07fda261265 commit + 71d196c9e2bffa978977785cd8859579e78bac24 blob - 1d8c8ef74b65a4293ca0d2c04c98c90170f334f1 blob + f3a3dc7d1991a6544fc58a1b0d83a5ac5b04b8dd --- 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-