From 2a70712d4b4a402b2a9a4498d0e24db8be72a6a0 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 25 Sep 2018 11:55:41 +0200 Subject: [PATCH] =?UTF-8?q?Utilisation=20de=20"printf"=20=C3=A0=20la=20pla?= =?UTF-8?q?ce=20de=20"echo"=20pour=20mieux=20g=C3=A9rer=20les=20sauts=20de?= =?UTF-8?q?=20ligne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- evomaintenance.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evomaintenance.sh b/evomaintenance.sh index fc29d89..2e01c02 100755 --- a/evomaintenance.sh +++ b/evomaintenance.sh @@ -4,7 +4,7 @@ # Dependencies (all OS): git postgresql-client # Dependencies (Debian): sudo -# version 0.4.0 +# version 0.4.1 # Copyright 2007-2018 Gregory Colpart , Jérémy Lecour , Evolix get_system() { @@ -108,7 +108,7 @@ if test -x "${GIT_BIN}"; then if [ "${CHANGED_LINES}" != "0" ]; then STATUS=$(${GIT_BIN} status --short | tail -n 10) # append diff data, without empty lines - GIT_STATUSES=$(echo "${GIT_STATUSES}\n${GIT_DIR} (last 10 lines)\n${STATUS}\n" | sed -e '/^$/d') + GIT_STATUSES=$(printf "%s\n%s\n%s\n" "${GIT_STATUSES}" "${GIT_DIR} (last 10 lines)" "${STATUS}" | sed -e '/^$/d') fi fi # unset environment variables to prevent accidental influence on other git commands @@ -169,7 +169,7 @@ if test -x "${GIT_BIN}"; then SHA=$(${GIT_BIN} rev-parse --short HEAD) STATS=$(${GIT_BIN} show --stat | tail -1) # append commit data, without empty lines - GIT_COMMITS=$(echo "${GIT_COMMITS}\n${GIT_DIR} : ${SHA} –${STATS}" | sed -e '/^$/d') + GIT_COMMITS=$(printf "%s\n%s : %s –%s" "${GIT_COMMITS}" "${GIT_DIR}" "${SHA}" "${STATS}" | sed -e '/^$/d') fi fi # unset environment variables to prevent accidental influence on other git commands