made error messages not suppressable
This commit is contained in:
Jandalf81
2018-08-16 19:03:02 +02:00
parent 5a1591b739
commit fe2e252a9f

View File

@@ -65,7 +65,7 @@ function killOtherNotification ()
function showNotification () function showNotification ()
{ {
# Quit here, if Notifications are not to be shown and they are not forced # Quit here, if Notifications are not to be shown and they are not forced
if [ "${showNotifications}" == "FALSE" ] && [ "$6" != "force" ] if [ "${showNotifications}" == "FALSE" ] && [ "$6" != "forced" ]
then then
return return
fi fi
@@ -170,7 +170,7 @@ function downloadSaves ()
log "INFO" "Found remote files" log "INFO" "Found remote files"
# download saves and states to corresponding ROM # download saves and states to corresponding ROM
rclone copy retropie:${remotebasedir}/${system} ~/RetroPie/saves/${system} --include "${filter}.*" --update rclone copy retropie:${remotebasedir}/${system} ~/RetroPie/saves/${system} --include "${filter}.*" --update >> ${logfile}
retval=$? retval=$?
if [ "${retval}" = "0" ] if [ "${retval}" = "0" ]
@@ -179,13 +179,12 @@ function downloadSaves ()
showNotification "Downloading saves and states from ${remoteType}... Done" "green" showNotification "Downloading saves and states from ${remoteType}... Done" "green"
else else
log "ERROR" "Saves could not be downloaded" log "ERROR" "Saves could not be downloaded"
showNotification "Downloading saves and states from ${remoteType}... ERROR" "red" showNotification "Downloading saves and states from ${remoteType}... ERROR" "red" "" "" "" "forced"
fi fi
fi fi
else # error with RCLONE else # error with RCLONE
log "ERROR" "Saves could not be downloaded" log "ERROR" "Saves could not be downloaded"
showNotification "Downloading saves and states from ${remoteType}... ERROR" "red" showNotification "Downloading saves and states from ${remoteType}... ERROR" "red" "" "" "" "forced"
fi fi
} }
@@ -209,7 +208,7 @@ function uploadSaves ()
showNotification "Uploading saves and states to ${remoteType}... No local saves found" showNotification "Uploading saves and states to ${remoteType}... No local saves found"
else # local files found else # local files found
# upload saves and states to corresponding ROM # upload saves and states to corresponding ROM
rclone copy ~/RetroPie/saves/${system} retropie:${remotebasedir}/${system} --include "${filter}.*" --update rclone copy ~/RetroPie/saves/${system} retropie:${remotebasedir}/${system} --include "${filter}.*" --update >> ${logfile}
retval=$? retval=$?
if [ "${retval}" = "0" ] if [ "${retval}" = "0" ]
@@ -218,7 +217,7 @@ function uploadSaves ()
showNotification "Uploading saves and states to ${remoteType}... Done" "green" showNotification "Uploading saves and states to ${remoteType}... Done" "green"
else else
log "ERROR" "Saves could not be uploaded" log "ERROR" "Saves could not be uploaded"
showNotification "Uploading saves and states to ${remoteType}... ERROR" "red" showNotification "Uploading saves and states to ${remoteType}... ERROR" "red" "" "" "" "forced"
fi fi
fi fi
} }