Correcting logging

This commit is contained in:
Theile
2022-10-21 10:38:58 +02:00
parent 9ef19139d2
commit 8b19773a7f
6 changed files with 6 additions and 18 deletions

View File

@@ -134,9 +134,7 @@ checkCmdOutput () {
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
if [[ ${exitStatus} -eq 0 ]] ; then if [[ ${exitStatus} -eq 0 ]] ; then
echo "${item} succesfully installed." echo "${item} succesfully installed."
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": warn" || true )" selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
echo "$selectedOutput"
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": req" || true )"
echo "$selectedOutput" echo "$selectedOutput"
else else
echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "ERROR installing ${item}. Exit code ${exitStatus}"

View File

@@ -81,9 +81,7 @@ checkCmdOutput () {
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
if [[ ${exitStatus} -eq 0 ]] ; then if [[ ${exitStatus} -eq 0 ]] ; then
echo "${item} succesfully installed." echo "${item} succesfully installed."
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": warn" || true )" selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
echo "$selectedOutput"
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": req" || true )"
echo "$selectedOutput" echo "$selectedOutput"
else else
echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "ERROR installing ${item}. Exit code ${exitStatus}"

View File

@@ -72,9 +72,7 @@ checkCmdOutput () {
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
if [[ ${exitStatus} -eq 0 ]] ; then if [[ ${exitStatus} -eq 0 ]] ; then
echo "${item} succesfully installed." echo "${item} succesfully installed."
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": warn" || true )" selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
echo "$selectedOutput"
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": req" || true )"
echo "$selectedOutput" echo "$selectedOutput"
else else
echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "ERROR installing ${item}. Exit code ${exitStatus}"

View File

@@ -72,9 +72,7 @@ checkCmdOutput () {
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
if [[ ${exitStatus} -eq 0 ]] ; then if [[ ${exitStatus} -eq 0 ]] ; then
echo "${item} succesfully installed." echo "${item} succesfully installed."
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": warn" || true )" selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
echo "$selectedOutput"
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": req" || true )"
echo "$selectedOutput" echo "$selectedOutput"
else else
echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "ERROR installing ${item}. Exit code ${exitStatus}"

View File

@@ -69,9 +69,7 @@ checkCmdOutput () {
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
if [[ ${exitStatus} -eq 0 ]] ; then if [[ ${exitStatus} -eq 0 ]] ; then
echo "${item} succesfully installed." echo "${item} succesfully installed."
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": warn" || true )" selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
echo "$selectedOutput"
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": req" || true )"
echo "$selectedOutput" echo "$selectedOutput"
else else
echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "ERROR installing ${item}. Exit code ${exitStatus}"

View File

@@ -72,9 +72,7 @@ checkCmdOutput () {
exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )" exitStatus="$( echo "${cmdOutput}" | grep --binary-files=text -i "exit" | tail -1 | sed -E 's/.*exit code ([0-9]).*/\1/g' || true )"
if [[ ${exitStatus} -eq 0 ]] ; then if [[ ${exitStatus} -eq 0 ]] ; then
echo "${item} succesfully installed." echo "${item} succesfully installed."
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": warn" || true )" selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
echo "$selectedOutput"
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i ": req" || true )"
echo "$selectedOutput" echo "$selectedOutput"
else else
echo "ERROR installing ${item}. Exit code ${exitStatus}" echo "ERROR installing ${item}. Exit code ${exitStatus}"