From 7c7181fc96264fd9cf04c22ac980a42225b3b148 Mon Sep 17 00:00:00 2001 From: Alex Thiessen Date: Sat, 13 Jan 2018 19:27:45 +0000 Subject: util/gitconfig: Replace subshells with braces The check for `user.name` and `user.email` being set is done in `gitconfig.sh` and it uses two subshells where none is actually needed. Stream redirection can be consolidated. Change-Id: Ia1d19eb3c11f9d11f030dcc179bc175956cd7116 Signed-off-by: Alex Thiessen Reviewed-on: https://review.coreboot.org/23250 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/gitconfig/gitconfig.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/gitconfig/gitconfig.sh b/util/gitconfig/gitconfig.sh index 08451c177f..c2c4a69bbd 100755 --- a/util/gitconfig/gitconfig.sh +++ b/util/gitconfig/gitconfig.sh @@ -59,9 +59,9 @@ git submodule update --init --checkout" git config alias.sup-destroy "!git submodule deinit --all --force; \ git submodule update --init --checkout" -(git config --includes user.name >/dev/null && \ - git config --includes user.email >/dev/null) || \ - (printf "Please configure your name and email in git:\n\n\ +{ git config --includes user.name && \ + git config --includes user.email; } >/dev/null || \ + { printf "Please configure your name and email in git:\n\n\ git config --global user.name \"Your Name Comes Here\"\n\ git config --global user.email your.email@example.com\n"; \ -exit 1) +exit 1; } -- cgit v1.2.3