From d2e17fd98878bd513fa27987e3c3086f485ecf89 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Mon, 7 Feb 2022 20:01:40 +0100 Subject: [PATCH] install: distinguish between create/overwrite for git config.user --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c09f281..e8f0a38 100755 --- a/install.sh +++ b/install.sh @@ -113,7 +113,12 @@ EOF git config -f "$temp_git" user.email "${GIT_EMAIL}" if ! diff "$config_file" "$temp_git" >/dev/null 2>&1; then - echo "${yellow}OVERWRITE:$rst $config_file with $temp_git:" + if [ -f "$config_file" ]; then + action=OVERWRITE + else + action=CREATE + fi + echo "$yellow$action:$rst $config_file with contents of $temp_git:" echo "$cyan" cat "$temp_git" echo "$rst"