Skip to content
Snippets Groups Projects
Commit 5ee0087d authored by efer's avatar efer
Browse files

notfication guide text + check for empty LNO var

parent 7b2d2560
No related branches found
No related tags found
No related merge requests found
......@@ -598,7 +598,11 @@ logupdate(){
MSG="with SUCCESS"
fi
LNO=\$( grep -n 'INFO' \$LOG-last | tail -1 | cut -d":" -f1 )
if [ -z \$LNO ]; then
echo "Error when running the backup script"
else
sed -n "\$LNO,\\\$p" \$LOG-last >> \$LOG-short
fi
echo -e "#### BACKUP END: \$(date +%Y-%m-%d\ %H:%M:%S) \$MSG" >> \$LOG-short
cat \$LOG-last >> \$LOG
rm -f \$LOG-last
......@@ -710,6 +714,8 @@ if [ $HOST_OS = 'Darwin' ]; then
echo -e "#
# Please click the 'Play' button in the header bar above to trigger a notification
#
# If the pop-up does NOT say: 'It is working!' follow the next steps
#
# Click the 'Script Editor' notifications pop-up to open the Notification Settings window
#
# Enable 'Allow notifications'
......@@ -719,7 +725,7 @@ if [ $HOST_OS = 'Darwin' ]; then
# Close the Script Editor and continue with the backup install script
# \n
" > /tmp/notification.applescript
echo 'display notification "Notifications from scripts are working!"' >> /tmp/notification.applescript
echo 'display notification "It is working!"' >> /tmp/notification.applescript
open -a 'Script Editor' /tmp/notification.applescript
sleep 5
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment