Changed preamble and comments
Changed the wording of some messages to the user and log. Program adds
the backup archive to the garbage list if the restoration was successful.
Script now takes flag '--mode=' appended with a mode.
- only current mode is 'debug'. Use this to enter debug run mode.
- script now outputs the session log is mode is in debug.
Added basic testing implementations
- WIP: only outputs the log file at end of a run.
- added option '--dev-test' to be used when running and testing the
program.
- practice of feature will be within a docker container but can
equally been used on a native system.
Created 'check_restoration' function for optimisation of repetition
- simply ensures that the restoration at any point was successful.
- if the restoration fails, the program logs and exits accordingly;
otherwise, if it succeeded then at this point the program exits
with a different exit code since something else went wrong to
trigger a system restoration.
- takes 2 arguments, the exit code of the restoration system and
the exit code of the section which triggered the restoration.
- refactored sections can be identified containing the
'check_restoration' function call.
Removed trailing whitespaces.
Changed the behaviour of tar to not be verbose and any output it placed
in a tmp file, STDERR is redirected to logs.
Bug with the format of exit code capture in updater that was fixed in
common; however, those changes hadn't been made until now in updater.
Fixed bugs and issues
- Fixed issue in common script with incorrect exit code capture of
subshells.
- Changed tar command for decompressing data.tar.gz file to only log
STDERR and void STDOUT.
- Log function was called without correct arguments @ln:239. Message
related to there being a new version available but wasn't logged.
Implemented notification system.
- Send a notification to the user's system using the `notify` function in common.
- Notifications are send on most important outcomes of the update
session meaning program can have STDOUT piped to another location
and still receive a message after operation.
- Added the `--no-notify` flag to prevent notifications from being
sent to the user. By default, notifications will be sent without
this flag.
- Program now checks to ensure the script is being ran with root
privilages. Program will exit otherwise without notification.
- Program now keeps track of garbage data to ensure a proper clean up
after operation of a session.
- Unnecessary large volumes of data sat in /tmp/ can be removed
instantly to prevent taking up space which isn't required. File
sizes significantly less can remain and cleared out on next
restart of the system.
- Updated usage message.
- Changed some of the output messages.
- Fixed bug with relative paths.
All the files associated with Microsoft Edge Updater have been added to
this repository to allow for version control as of this point and for
other users to start using/testing the program.
There are no previous commits in the history for these files; however,
further development will be continued and committed to this repo.
Currently the program is at version 0.1.2 in beta phase of development
and currently stable as of minimal testing.