Commit Graph

59 Commits

Author SHA1 Message Date
05ef201cff Updated README.md
Changed usage message respectable to the help screen.
2021-07-01 14:12:27 +01:00
e1c95d1b73 Updated help message
Changed help message to match documentation
2021-07-01 14:11:54 +01:00
e1c3f9f1cc Fixed bug
Identified bug around line 400 where line started with 'r[['. Removed 'r' from the start of the line.
2021-07-01 13:56:14 +01:00
664655bc65 Merge branch 'main' of https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater 2021-07-01 13:53:55 +01:00
TheOnePath
0dc7f2ca17 Merge pull request 'documentation' (#5) from documentation into main
Reviewed-on: https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater/pulls/5
2021-07-01 13:53:22 +01:00
4a8f5a3a8b Fixed spelling 2021-07-01 13:49:27 +01:00
6c46a42e78 Fixed spelling
Fixed typos identified in PR review.
Updated manpage accordingly by generation.
2021-07-01 13:32:24 +01:00
bb181e630c Updated README.md to v0.2.0 2021-06-30 15:49:38 +01:00
24dfa44ba7 Merge remote-tracking branch 'origin/main' into documentation 2021-06-30 15:43:18 +01:00
f7dff7e7d8 Changed version to no longer be in alpha. 2021-06-30 15:42:52 +01:00
4cf35ddf28 Updated documentation to v0.2.0
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.
2021-06-30 15:39:05 +01:00
21889a7362 Updated updater
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.
2021-06-24 15:51:05 +01:00
0f397879d7 Merge branch 'main' of https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater 2021-06-24 00:01:06 +01:00
9094d209df Updated updater to v0.2
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.
2021-06-23 23:50:54 +01:00
f48c5a8a22 Updated .gitignore
Added to ignore my TODO list file.
2021-06-23 23:48:30 +01:00
54326d7052 Updated source.list to v0.2
source.list now takes an extra parameter in [dists]; the architecture
followed by the Edge channel to update.
2021-06-23 23:47:09 +01:00
TheOnePath
fd95779cdd Merge pull request 'documentation' (#4) from documentation into main
Reviewed-on: https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater/pulls/4
2021-06-23 11:28:54 +01:00
f2ca9217ba Updated documentation according to review
Chnaged documentation based on suggests in the PR review by Robert
Morrison.
2021-06-23 11:26:17 +01:00
a68ac1cbac Merge remote-tracking branch 'origin/main' into documentation 2021-06-22 17:21:42 +01:00
4e68936a6a Committing extra changes missed
Addition changes which are part of the previous commit but weren't added
for tracking before committing.
2021-06-22 17:20:44 +01:00
8522783a12 Updated updater
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.
2021-06-22 17:18:14 +01:00
a2fcbb0512 Updated common
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.
2021-06-22 17:16:09 +01:00
198ee1d4dc Updated documentation to v0.1.4
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
2021-06-22 16:26:18 +01:00
3ee9ca3936 Updated README.md to v0.1.4 2021-06-22 12:55:12 +01:00
8f21f3903d Fixed bug with debugging mode
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.
2021-06-21 18:31:52 +01:00
39b0b06a8c Updated .gitignore 2021-06-21 15:58:49 +01:00
05e178b38b Fixed bug with testing variable 2021-06-21 15:54:50 +01:00
d2e13eb940 Updated common and fixed bugs
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.
2021-06-21 15:06:18 +01:00
da6922a337 Updated updater and fixed bugs
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.
2021-06-21 14:35:48 +01:00
9ec3bacc9d Fixed bug
Logic error identifying if a backup file exists.
2021-06-15 23:51:25 +01:00
0fb16f178d Fixed bug
Fixed issue with subshell command not being completed.
2021-06-15 23:33:19 +01:00
00275314d7 Fixed bug
Syntax bug in common file.
Updated .gitignore to exclude Dockerfile during testing.
2021-06-15 16:47:18 +01:00
11a90f8f92 Fixed bugs
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.
2021-06-13 21:41:33 +01:00
8340f56d2f Updated documentation version number to 0.1.4 2021-06-05 16:56:44 +01:00
a7bb0d2d80 Updated to v0.1.4
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.
2021-06-05 16:51:12 +01:00
0cc68dff4c Added .gitignore file 2021-06-04 21:49:15 +01:00
3dc97f6d35 Removed log files 2021-06-04 21:49:00 +01:00
TheOnePath
f88fb0ee10 Merge pull request 'documentation' (#3) from documentation into main
Reviewed-on: https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater/pulls/3
2021-06-04 21:21:54 +01:00
8254c00f91 Merge branch 'documentation' of https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater into documentation 2021-06-04 21:05:18 +01:00
5163e7c6b9 Applied patch to markdown provided by @robert 2021-06-04 21:04:44 +01:00
TheOnePath
27c75b3c9b Merge branch 'main' into documentation 2021-06-04 19:23:01 +01:00
4b7c9ba709 Updated documentation to v0.1.3 2021-06-04 19:22:28 +01:00
5f5f97b106 Updated markdown manpage to match v0.1.3 2021-06-04 18:33:00 +01:00
TheOnePath
82b12aec1d Merge pull request 'Formatting of Markdown' (#2) from robert/Microsoft-Edge-Updater:documentation into documentation
Reviewed-on: https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater/pulls/2
2021-06-03 23:41:58 +01:00
Robert Morrison
93c0db0201 Updated To fix issues in review 2021-06-01 18:04:38 +01:00
9665f610a5 Updated README.md to reflect license 2021-05-28 18:39:18 +01:00
ad955c44a5 Updated README.md to v0.1.3 2021-05-28 18:37:06 +01:00
eb1ed051d2 Updated common to v0.1.3
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.
2021-05-28 18:26:55 +01:00
2add5afc7c Updated updater to v0.1.3
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.
2021-05-28 18:09:13 +01:00
Robert Morrison
21c208a326 Formatting of Markdown
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
2021-05-24 16:29:15 +01:00