mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-26 21:03:57 +00:00
Logging fixes
This commit is contained in:
@@ -461,7 +461,9 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
if [ -e "$targetDir/$appName" ]; then
|
if [ -e "$targetDir/$appName" ]; then
|
||||||
printlog "Removing existing $targetDir/$appName" DEBUG
|
printlog "Removing existing $targetDir/$appName" DEBUG
|
||||||
deleteAppOut=$(rm -Rfv "$targetDir/$appName" 2>&1)
|
deleteAppOut=$(rm -Rfv "$targetDir/$appName" 2>&1)
|
||||||
printlog "Debugging enabled, App removing output was:\n$deleteAppOut" DEBUG
|
deleteAppOut=$(echo $deleteAppOut | cut -c 1-80)
|
||||||
|
deduplicatelogs "$deleteAppOut"
|
||||||
|
printlog "Debugging enabled, App removing output was:\n$logoutput" DEBUG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy app to /Applications
|
# copy app to /Applications
|
||||||
@@ -485,7 +487,7 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
|
|
||||||
CLIoutput=$("$mountname/$CLIInstaller" "${CLIArguments[@]}" 2>&1)
|
CLIoutput=$("$mountname/$CLIInstaller" "${CLIArguments[@]}" 2>&1)
|
||||||
CLIstatus=$(echo $?)
|
CLIstatus=$(echo $?)
|
||||||
dedupliatelogs "$CLIoutput"
|
deduplicatelogs "$CLIoutput"
|
||||||
|
|
||||||
if [ $CLIstatus -ne 0 ] ; then
|
if [ $CLIstatus -ne 0 ] ; then
|
||||||
cleanupAndExit 3 "Error installing $mountname/$CLIInstaller $CLIArguments error:\n$logoutput" ERROR
|
cleanupAndExit 3 "Error installing $mountname/$CLIInstaller $CLIArguments error:\n$logoutput" ERROR
|
||||||
@@ -597,7 +599,7 @@ installFromPKG() {
|
|||||||
pkgInstallStatus=$(echo $?)
|
pkgInstallStatus=$(echo $?)
|
||||||
sleep 1
|
sleep 1
|
||||||
pkgEndTime=$(date "+$LogDateFormat")
|
pkgEndTime=$(date "+$LogDateFormat")
|
||||||
pkgInstall+=$(echo "Output of /var/log/install.log below this line.\n")
|
pkgInstall+=$(echo "\nOutput of /var/log/install.log below this line.\n")
|
||||||
pkgInstall+=$(echo "----------------------------------------------------------\n")
|
pkgInstall+=$(echo "----------------------------------------------------------\n")
|
||||||
pkgInstall+=$(awk -v "b=$starttime" -v "e=$pkgEndTime" -F ',' '$1 >= b && $1 <= e' /var/log/install.log)
|
pkgInstall+=$(awk -v "b=$starttime" -v "e=$pkgEndTime" -F ',' '$1 >= b && $1 <= e' /var/log/install.log)
|
||||||
deduplicatelogs "$pkgInstall"
|
deduplicatelogs "$pkgInstall"
|
||||||
|
|||||||
Reference in New Issue
Block a user