diff options
| author | brian m. carlson <sandals@crustytoothpaste.net> | 2025-02-10 23:49:47 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-10 16:16:19 -0800 |
| commit | 59d26bd9619c1bb37b1ccb4a93a71221bec46e12 (patch) | |
| tree | 072a46299cc209a57b7a3f4cc2f369e249f91c3e | |
| parent | 2f323bb16219c105e0c576ea4c2ece9863f5d926 (diff) | |
| download | git-59d26bd9619c1bb37b1ccb4a93a71221bec46e12.tar.gz | |
thunderbird-patch-inline: avoid bashism
The use of "echo -e" is not portable and not specified by POSIX. dash
does not support any options except "-n", and so this script will not
work on operating systems which use that as /bin/sh.
Fortunately, the solution is easy: switch to printf(1), which is
specified by POSIX and allows the escape sequences we want to use. This
will allow the script to work with any POSIX shell.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rwxr-xr-x | contrib/thunderbird-patch-inline/appp.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh index 1053872eea..fdcc948352 100755 --- a/contrib/thunderbird-patch-inline/appp.sh +++ b/contrib/thunderbird-patch-inline/appp.sh @@ -31,7 +31,7 @@ BODY=$(sed -e "1,/${SEP}/d" $1) CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}") DIFF=$(sed -e '1,/^---$/d' "${PATCH}") -CCS=$(echo -e "$CMT_MSG\n$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \ +CCS=$(printf '%s\n%s\n' "$CMT_MSG" "$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \ -e 's/^Signed-off-by: \(.*\)/\1,/gp') echo "$SUBJECT" > $1 |
