mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Improved logging
Overall purpose was to improve the logging in the scripts. But the handling of macOS version and Installomator version in order to utilize swiftDialog has been improved, too.
This commit is contained in:
@@ -33,6 +33,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=tell_user_then_quit" # Separated b
|
||||
# Fill the variable "item" above with a label.
|
||||
# Script will run this label through Installomator.
|
||||
######################################################################
|
||||
# v. 9.2.2 : A bit more logging on succes.
|
||||
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
||||
######################################################################
|
||||
|
||||
@@ -77,8 +78,8 @@ cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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
|
||||
echo "${item} succesfully installed."
|
||||
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
||||
echo "$warnOutput"
|
||||
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
|
||||
echo "$selectedOutput"
|
||||
else
|
||||
echo "ERROR installing ${item}. Exit code ${exitStatus}"
|
||||
echo "$cmdOutput"
|
||||
|
||||
@@ -33,6 +33,7 @@ installomatorOptions="BLOCKING_PROCESS_ACTION=prompt_user" # Separated by space
|
||||
# Fill the variable "item" above with a label.
|
||||
# Script will run this label through Installomator.
|
||||
######################################################################
|
||||
# v. 9.2.2 : A bit more logging on succes.
|
||||
# v. 9.2.1 : Better logging handling and installomatorOptions fix.
|
||||
######################################################################
|
||||
|
||||
@@ -77,8 +78,8 @@ cmdOutput="$(${destFile} ${item} LOGO=$LOGO ${installomatorOptions} || 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
|
||||
echo "${item} succesfully installed."
|
||||
warnOutput="$( echo "${cmdOutput}" | grep --binary-files=text -i "warn" || true )"
|
||||
echo "$warnOutput"
|
||||
selectedOutput="$( echo "${cmdOutput}" | grep --binary-files=text -E ": (REQ|ERROR|WARN)" || true )"
|
||||
echo "$selectedOutput"
|
||||
else
|
||||
echo "ERROR installing ${item}. Exit code ${exitStatus}"
|
||||
echo "$cmdOutput"
|
||||
|
||||
Reference in New Issue
Block a user