Updated markdown form of manpage to v0.2.0 with respectable changes to
what was changed in updater v0.2.0.
Manpage updated via pandoc generation of markdown form.
Added quiet operation
- this will prevent STDOUT and STDERR from being displayed to the
terminal, unless a decision is encountered - will not assume yes.
- notifications are still sent since '--no-notify' can be used.
All echo statements responsible for outputting have been changed to
initial check if script is running in quiet mode.
'printf' statements which do not serve a specific purpose have been
changed to 'echo' commands.
'echo' statements that are responsible for displaying error messages are
now sent over STDERR instead of STDOUT.
Added '--full-clean' argument which will remove any possibly generated
files, by updater, from the system, including logs.
The channel for Edge to be updated can be changed between dev and beta.
- all hardcoded values which contained the keyword "beta" have been
replaced with a variable substitute.
Moved the source.list check statement before checking if Edge is
installed to determine which channel is being used that session.
- the channel is determined from the source.list file, alternatively
using the '-c | --set-channel=' flag.
Updated preamble and help message display.
Other fixes.
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.
Changed comments and preamble of script.
'backup_file' variable in 'restore_function' is now global to allow for
removal of backup archive if the restoration was successful.
Added the '--mode' flag and desciption.
Updated the dependencies required for updater to run. With these
installed on any system, the program should run.
Adjusted spacing layout of document.
Updated manpage according to markdown using pandoc
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.
Refactored 'archive_system' function
- function now explicitly identifies which require compressing.
- symbolic links are removed from the list(s) due to causing issues
during the decompression stage when restoring the system. Symlinks
are then stored in a record with the symlink name followed by the
target. Both prefixed with paths to location and ':' delimited,
respectfully.
- system is then compressed using tar gzip compression, overwriting
any previously generated archive generated.
Refactored 'restore_system' function
- changed 'backup_file' to no longer require the final sed command
similar what's found in 'archive_function' - unnecessary
processing.
- fixed tar statement to correctly output the contents of the
decompression to the root of the system ("/").
- added function to recreate the symlink files. It's unlikely that
symlink files need replacing due to their behaviour; however, for
clarity, the identified symlink files during archiving are recreated
to their original location and linked to their target location.
Removed trailing whitespaces.
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.
Common now contains a notify function which uses notify-send to provide
a user with a notification when the function is called.
- Function takes 2 inputs, {summary} and {body} which are respectful
to the basic arguments for notify-send.
- Function returns an issue with required amount of arguments aren't
met.
- Default arguments are used with notify-send, no other interaction
is made possible.
Updated backup functions to only log STDERR to file, which files are
(de)compressed aren't fundamental to logging information and exact files
can be checked appropriately via other means.
Fixed bug with relative path being incorrect for operation of updater
when sourcing in common.
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.
I have formatted the markdown so it does what I understand you want.
The dash used is an em dash `—`
The pandoc command for converting the markdown into a manpage is
`pandoc INFILE -s -t man -o OUTFILE`
I have also provided a generated manpage