From 203640aa3b157cbb37e7a0bf410f5b902621fe51 Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Thu, 9 Sep 2021 15:47:38 +0100 Subject: [PATCH 1/6] Updated name of program Renamed the program from 'updater' to 'msedge-updater'. Updated all files related to the original name to adopt new name. --- README.md | 15 +- updater => msedge-updater | 10 +- msedge-updater.1 | 289 ++++++++++++++++++++++++++++ updater.1.md => msedge-updater.1.md | 24 +-- utils/common | 4 +- 5 files changed, 316 insertions(+), 26 deletions(-) rename updater => msedge-updater (98%) create mode 100644 msedge-updater.1 rename updater.1.md => msedge-updater.1.md (86%) diff --git a/README.md b/README.md index dfc751e..cce80df 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # Microsoft Edge Updater -An updater program which can install the latest available version of Microsoft Edge to non-Debian-based Linux distros. +An updater program which can install the latest available version of Microsoft Edge to non-APT-based Linux distros. Currently this program can only update the Beta release of Microsoft Edge for amd64 architectures. ## Usage ``` -Usage: updater [OPTION] +Usage: msedge-updater [OPTION] Microsoft Edge Updater (0.2.0) - An updater program which can install the latest available version of Microsoft Edge to non-Debian-based Linux distros. DISCLAIMER: Currently this program has only updated Microsoft Edge for amd64 architectures, other architectures might be possible but not tested. @@ -20,7 +20,7 @@ Options: -q, --quiet Operate strictly with no output on STDOUT or STDERR, prompts will NOT assume yes however. Logging still occurs in background. --mode= Set the mode of the program to be ran in. Default mode occurs without this flag. * debug - run program in debug mode. (WIP) - --full-clean Remove all content generated by updater after a session, this includes all logs. + --full-clean Remove all content generated by the updater after a session, this includes all logs. -y, --yes-all Assume yes to all yes/no decisions. -v, --version Print out the version of the script and exit. -h, --help Print this help message and exit. @@ -28,7 +28,7 @@ Options: ## Information * Program Name - Microsoft Edge Updater -* Script Name - `updater` +* Script Name - `msedge-updater` * Version - 0.2.0 * Synopsis - update Microsoft Edge to the latest release. * Author(s) - Ethan Smith-Coss (No contact) @@ -36,11 +36,12 @@ Options: * License - GNU GPLv3+ ## Documentation -For more in-depth documentation on `updater`, view the manpage in markdown form [here](https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater/src/branch/main/updater.1.md). +For more in-depth documentation on `msedge-updater`, view the manpage in markdown form +[here](https://git.closedless.xyz/ClosedLess/Microsoft-Edge-Updater/src/branch/main/msedge-updater.1.md). Alternatively you can view the manpage from your terminal by downloading the project. ```bash - $ git clone https://robmc.duckdns.org/git/TheOnePath/Microsoft-Edge-Updater/src/branch/main + $ git clone https://git.closedless.xyz/ClosedLess/Microsoft-Edge-Updater/src/branch/main $ cd Microsoft-Edge-Updater/ - $ man ./updater.1 + $ man ./msedge-updater.1 ``` diff --git a/updater b/msedge-updater similarity index 98% rename from updater rename to msedge-updater index 8c95e77..2d0e96d 100755 --- a/updater +++ b/msedge-updater @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################### # # -# updater - Automatically update Microsoft Edge on Solus # +# msedge-updater - Automatically update Microsoft Edge on Solus # # # # Dependencies: # # bash # @@ -15,18 +15,18 @@ # notify-send # # # # # -# Disclaimer: This version only works for MS Edge Beta. # +# Disclaimer: This version only works for amd64 architectures. # # A later release may allow for update of Dev builds # # and potentially both. # # # # Author: Ethan Smith-Coss # # Version: 0.2.0 # # Created: 2021-05-20T16:47+0100 # -# Last Modified: 2021-06-24T15:49+0100 # +# Last Modified: 2021-09-9T15:43+0100 # # # # #################################### # # # -# updater - Automatically update Microsoft Edge on Solus # +# msedge-updater - Automatically update Microsoft Edge on Solus # # Copyright ©️ 2021 Ethan Smith-Coss # # # # This program is free software: you can redistribute it and/or modify # @@ -61,7 +61,7 @@ Options: -q, --quiet Operate strictly with no output on STDOUT or STDERR, prompts will NOT assume yes however. Logging still occurs in background. --mode= Set the mode of the program to be ran in. Default mode occurs without this flag. * debug - run program in debug mode. (WIP) - --full-clean Remove all content generated by updater after a session, this includes all logs. + --full-clean Remove all content generated by the updater after a session, this includes all logs. -y, --yes-all Assume yes to all yes/no decisions. -v, --version Print out the version of the script and exit. -h, --help Print this help message and exit. diff --git a/msedge-updater.1 b/msedge-updater.1 new file mode 100644 index 0000000..cef6a54 --- /dev/null +++ b/msedge-updater.1 @@ -0,0 +1,289 @@ +.\" Automatically generated by Pandoc 2.5 +.\" +.TH "MSEDGE\-UPDATER" "1" "September 9, 2021" "updater 0.2.0" "User Manual" +.hy +.SH NAME +.PP +\f[C]msedge\-updater\f[R] \[em] Automatically update Microsoft Edge on +Solus +.SH SYNOPSIS +.PP +\f[B]\f[CB]msedge\-updater\f[B]\f[R] [ \f[I]option\f[R] ] +.SH OPTIONS +.IP \[bu] 2 +\f[C]\-nn, \-\-no\-notify\f[R] +.PD 0 +.P +.PD +Prevent notifications from being sent after a session. +.IP \[bu] 2 +\f[C]\-c, \-\-set\-channel=\f[R] +.PD 0 +.P +.PD +Change the channel to be updated for Microsoft Edge. +Will default to the value defined in \f[C]source.list\f[R] if flag is +not present. +.RS 2 +.IP \[bu] 2 +beta \- update the Beta channel release. +.IP \[bu] 2 +dev \- update the Dev channel release. +.RE +.IP \[bu] 2 +\f[C]\-q, \-\-quiet\f[R] +.PD 0 +.P +.PD +Operate strictly with no output on \f[C]STDOUT\f[R] or \f[C]STDERR\f[R], +prompts will \f[B]NOT\f[R] assume yes however. +Logging still occurs in background. +.IP \[bu] 2 +\f[C]\-\-mode=\f[R] +.PD 0 +.P +.PD +Set the mode of the program to be ran in. +Default mode occurs without this flag. +.RS 2 +.IP \[bu] 2 +\f[B]\f[BI]debug\f[B]\f[R] \- run program in debug mode. +(\f[B]WIP\f[R]) +.RE +.IP \[bu] 2 +\f[C]\-\-full\-clean\f[R] +.PD 0 +.P +.PD +Remove all content generated by the updater after a session, this +includes all logs. +.IP \[bu] 2 +\f[C]\-y, \-\-yes\-all\f[R] +.PD 0 +.P +.PD +Assume yes to all yes/no decisions. +.IP \[bu] 2 +\f[C]\-v, \-\-version\f[R] +.PD 0 +.P +.PD +Print out the version of the script and exit. +.IP \[bu] 2 +\f[C]\-h, \-\-help\f[R] +.PD 0 +.P +.PD +Print this help message and exit +.SH DESCRIPTION +.PP +Microsoft Edge Updater is a program which will download and update your +installation of Microsoft Edge to the latest release version identified. +The main script is \f[C]msedge\-updater\f[R] and while the system is +akin to a package manager, it\[cq]s much, much simpler. +.PP +Systems that run Debian\-based distros (using the \f[C]apt\f[R] package +manager) or Fedora/openSUSE (using the \f[C]dnf\f[R] package manager), +should install Microsoft Edge to their package manager according to the +official guide over at Microsoft Edge Insider \- Command line +installation (https://www.microsoftedgeinsider.com/en-us/download/). +.PP +For those systems that use the amd64 architecture but not the perviously +mentioned bases/distros, or package managers, may benefit from this +program. +\f[C]msedge\-updater\f[R] uses the Debian (\f[C].deb\f[R]) release +versions of Microsoft Edge and automatically installs them to your +system so you don\[cq]t have to again! +.SS NOTE +.PP +\f[C]msedge\-updater\f[R] must be ran with root privileges. +If the script fails to identify its elevation, it will exit and display +a message to STDOUT. +.SS DISCLAIMER!! +.PP +Currently this program has only updated Microsoft Edge for amd64 +architectures, other architectures might be possible but not tested. +.SS Testing Systems +.PP +\f[C]msedge\-updater\f[R] has been known to successfully run, download +and update Microsoft Edge (Beta) on Solus 4.2 Fortitude, Kernel version +5.11.21\-179 and later. +.PP +The test environment is a custom Docker image built from the Alpine +base. +Due to certain dependencies of Microsoft Edge, \f[C]msedge\-updater\f[R] +will currently finish with exit code 11 on a successful session due to +the binary, \f[C]msedge\f[R], not being able to run. +This issue is only known for Busybox systems using \f[C]musl\f[R], and +not \f[C]glibc\f[R], which Microsoft Edge is built using. +.SH DEPENDENCIES +.IP \[bu] 2 +bash +.IP \[bu] 2 +wget +.IP \[bu] 2 +git +.IP \[bu] 2 +gunzip +.IP \[bu] 2 +tar +.IP \[bu] 2 +coreutils (>=8.32) +.IP \[bu] 2 +binutils (>=2.35.1) +.IP \[bu] 2 +procps (only Busybox\-based systems) +.SH FILES +.IP \[bu] 2 +\f[C]source.list\f[R] \[em] +.RS 2 +.PP +This file contains a list of URL end\-points to the official Microsoft +Edge packages page. +There are 3 lines with dedicated purposes: +.IP \[bu] 2 +\f[C][host]\f[R] \[em] +.PD 0 +.P +.PD +A URL to the front page of Microsoft\[cq]s Packages site, used to check +connectivity and if the site is reachable. +.IP \[bu] 2 +\f[C][dists]\f[R] \[em] +.PD 0 +.P +.PD +Most iconic line and resembles that of an APT entry for package +information. +This line can be broken into 4 parts +.RS 2 +.IP "1." 3 +\f[C][dists=amd64,]\f[R] \[em] +.PD 0 +.P +.PD +This tells the updater which package architecture it should download for +the system. +Comma delimited to that, determine which channel of Microsoft Edge to +update by default, and can be changed or override by flag arguments. +The default value of \f[C]dists\f[R] is \f[C]amd64,beta\f[R]. +.IP "2." 3 +\f[C]\f[R] \[em] +.PD 0 +.P +.PD +The URL which points to the distribution repository on the Microsoft +Packages server. +.IP "3." 3 +\f[C]main\f[R] \[em] +.PD 0 +.P +.PD +The main branch of the distribution repository. +.IP "4." 3 +\f[C]stable\f[R] \[em] +.PD 0 +.P +.PD +The type of release that should be installed to the system. +.RE +.IP \[bu] 2 +\f[C][pool]\f[R] \[em] +.PD 0 +.P +.PD +The prefix URL to the repository end\-point that stores the latest +releases. +The suffix comes from the Release information. +.RE +.IP \[bu] 2 +\f[C]logs/\f[R] \[em] +.RS 2 +.PP +This is a directory which holds the session and history logs. +.IP \[bu] 2 +\f[C]logs/updater.log\f[R] \[em] +.PD 0 +.P +.PD +A full report log of the previous update session. +Replaced after every next update session. +.IP \[bu] 2 +\f[C]logs/updater.history\f[R] \[em] +.PD 0 +.P +.PD +A history of all the previous update sessions. +Never replaced, only appended to after every next update session. +.RE +.IP \[bu] 2 +\f[C]utils/\f[R] \[em] +.RS 2 +.PP +Resource directory which contains any utility scripts. +These are stand\-alone; however, don\[cq]t have any specific purpose +being executed by a user. +.IP \[bu] 2 +\f[C]utils/common\f[R] \[em] +.PD 0 +.P +.PD +A utility file with common functions for the updater. +.RE +.SH EXIT STATUS +.IP \[bu] 2 +0 \[em] Successful +.IP \[bu] 2 +1 \[em] General Error (Errors not severe enough to the cause of the +updater to stop) +.IP \[bu] 2 +2 \[em] Could not find \f[C]source.list\f[R] for the update +.IP \[bu] 2 +3 \[em] Host could not be reached. +Check Internet connectivity and/or host URL +.IP \[bu] 2 +4 \[em] Failed to download either the Packages information or Content +information files +.IP \[bu] 2 +5 \[em] Pool end\-point could not be reached +.IP \[bu] 2 +6 \[em] Failed to download the identified Debian (\f[C].deb\f[R]) file +from the host\[cq]s pool +.IP \[bu] 2 +7 \[em] Checksum verification of Debian (\f[C].deb\f[R]) file failed. +At this point, the downloaded file is removed +.IP \[bu] 2 +8 \[em] Failed to unarchive the Debian (\f[C].deb\f[R]) file or +decompress the \f[C]data.tar.gz\f[R] file +.IP \[bu] 2 +9 \[em] Failed to copy the new files to the system. +At this point, the backup is restored to the system to prevent +corruption +.IP \[bu] 2 +10 \[em] The archive function failed to create an archive of the system +.IP \[bu] 2 +11 \[em] If the system successfully restored files on an update failure, +the updater will exit with this code stating the update failed but +restoration was successful +.IP \[bu] 2 +12 \[em] The restore function failed to restore the files to their +original location +.IP \[bu] 2 +254 \[em] The channel to update cannot be identified. +Most likely cause is \f[C]source.list\f[R] is corrupt and \f[C]\-c\f[R] +was not passed. +.IP \[bu] 2 +255 \[em] EOF flag was set when reading the Packages information file +.IP \[bu] 2 +Other \[em] an exit code not related to the updater may have been +raised. +Consult the logs to identify which command returned the exit code. +.SH AUTHORS +.IP \[bu] 2 +Ethan Smith\-Coss +.SH CONTRIBUTORS +.IP \[bu] 2 +Robert Morrison \[em] Documentation +.SS Contacting +.PP +All contacts should be done through Issues on Gitea. diff --git a/updater.1.md b/msedge-updater.1.md similarity index 86% rename from updater.1.md rename to msedge-updater.1.md index eb6228f..bec0959 100644 --- a/updater.1.md +++ b/msedge-updater.1.md @@ -1,16 +1,16 @@ --- -title: UPDATER +title: MSEDGE-UPDATER section: 1 header: User Manual footer: updater 0.2.0 -date: June 30, 2021 +date: September 9, 2021 --- # NAME -`updater` — Automatically update Microsoft Edge on Solus +`msedge-updater` — Automatically update Microsoft Edge on Solus # SYNOPSIS -**`updater`** [ _option_ ] +**`msedge-updater`** [ _option_ ] # OPTIONS * `-nn, --no-notify` @@ -25,7 +25,7 @@ date: June 30, 2021 Set the mode of the program to be ran in. Default mode occurs without this flag. * ___debug___ - run program in debug mode. (__WIP__) * `--full-clean` - Remove all content generated by updater after a session, this includes all logs. + Remove all content generated by the updater after a session, this includes all logs. * `-y, --yes-all` Assume yes to all yes/no decisions. * `-v, --version` @@ -37,7 +37,7 @@ date: June 30, 2021 Microsoft Edge Updater is a program which will download and update your installation of Microsoft Edge to the latest release version identified. -The main script is `updater` and while the system is akin to a package manager, +The main script is `msedge-updater` and while the system is akin to a package manager, it's much, much simpler. Systems that run Debian-based distros (using the `apt` package manager) @@ -49,12 +49,12 @@ according to the official guide over at For those systems that use the amd64 architecture but not the perviously mentioned bases/distros, or package managers, may benefit from this program. -`updater` uses the Debian (`.deb`) release versions of Microsoft Edge +`msedge-updater` uses the Debian (`.deb`) release versions of Microsoft Edge and automatically installs them to your system so you don't have to again! ## NOTE -`updater` must be ran with root privileges. If the script fails to identify its elevation, +`msedge-updater` must be ran with root privileges. If the script fails to identify its elevation, it will exit and display a message to STDOUT. ### DISCLAIMER!! @@ -62,12 +62,12 @@ Currently this program has only updated Microsoft Edge for amd64 architectures, might be possible but not tested. ### Testing Systems -`updater` has been known to successfully run, +`msedge-updater` has been known to successfully run, download and update Microsoft Edge (Beta) on Solus 4.2 Fortitude, Kernel version 5.11.21-179 and later. The test environment is a custom Docker image built from the Alpine base. Due to certain dependencies -of Microsoft Edge, `updater` will currently finish with exit code 11 on a successful session due to +of Microsoft Edge, `msedge-updater` will currently finish with exit code 11 on a successful session due to the binary, `msedge`, not being able to run. This issue is only known for Busybox systems using `musl`, and not `glibc`, which Microsoft Edge is built using. @@ -128,7 +128,7 @@ and not `glibc`, which Microsoft Edge is built using. however, don't have any specific purpose being executed by a user. * `utils/common` — - A utility file with common functions for updater. + A utility file with common functions for the updater. # EXIT STATUS * 0 — Successful @@ -146,7 +146,7 @@ and not `glibc`, which Microsoft Edge is built using. * 12 — The restore function failed to restore the files to their original location * 254 — The channel to update cannot be identified. Most likely cause is `source.list` is corrupt and `-c` was not passed. * 255 — EOF flag was set when reading the Packages information file -* Other — an exit code not related to updater may have been raised. Consult the logs to identify which command returned the exit code. +* Other — an exit code not related to the updater may have been raised. Consult the logs to identify which command returned the exit code. # AUTHORS * Ethan Smith-Coss diff --git a/utils/common b/utils/common index 3856543..982568a 100755 --- a/utils/common +++ b/utils/common @@ -1,6 +1,6 @@ #!/bin/bash ######################################################################### -# common - Utility file with common functions for updater # +# common - Utility file with common functions for msedge-updater # # # # Dependencies: # # bash # @@ -15,7 +15,7 @@ # # # #################################### # # # -# common - Utility file with common functions for updater # +# common - Utility file with common functions for msedge-updater # # Copyright ©️ 2021 Ethan Smith-Coss # # # # This program is free software: you can redistribute it and/or modify # From 9ff1b6e40e197e6dd6b2d134d7956876e5bd0cce Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Thu, 9 Dec 2021 17:15:06 +0000 Subject: [PATCH 2/6] Fixed bug Since file was renamed to `msedge-updater`, check if Edge process is running with simply "msedge" is no longer suitable. - changed this to "msedge-$edge-channel" --- msedge-updater | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msedge-updater b/msedge-updater index 2d0e96d..04e3dc7 100755 --- a/msedge-updater +++ b/msedge-updater @@ -302,7 +302,7 @@ log "DEBUG" "There is a more recent release of Microsoft Edge ($edge_channel) av [[ ! $quiet -eq 0 ]] && >&2 echo "Identified a new release of Microsoft Edge ($edge_channel) [Current: v$current_version. New: v$release_version]. Starting the download and installation process..." ## check if msedge process is already running -is_running=$(ps -aux | grep -oc 'msedge') +is_running=$(ps -aux | grep -oc "msedge-$edge_channel") if [[ $is_running -gt 1 ]] ; then log "DEBUG" "Identified running processes for msedge. Determining how script should handle process..." "$log_file" if [[ ! $yes_flag -eq 0 ]] ; then From a44a69e56829701697574431bd7ec6e442a5c0a3 Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Thu, 9 Dec 2021 17:23:05 +0000 Subject: [PATCH 3/6] Updated version Updated the version to 0.2.1 for minor changes --- msedge-updater | 6 +- msedge-updater.1 | 2 +- msedge-updater.1.md | 4 +- updater.1 | 287 -------------------------------------------- 4 files changed, 6 insertions(+), 293 deletions(-) delete mode 100644 updater.1 diff --git a/msedge-updater b/msedge-updater index 04e3dc7..f8c68f3 100755 --- a/msedge-updater +++ b/msedge-updater @@ -20,8 +20,8 @@ # and potentially both. # # # # Author: Ethan Smith-Coss # -# Version: 0.2.0 # -# Created: 2021-05-20T16:47+0100 # +# Version: 0.2.1 # +# Created: 2021-12-09T16:51+0000 # # Last Modified: 2021-09-9T15:43+0100 # # # # #################################### # @@ -46,7 +46,7 @@ ## program name prog_name="Microsoft Edge Updater" ## version -version="0.2.0" +version="0.2.1" ## usage statement usage="Usage: $(basename $0) [OPTION] $prog_name ($version) - An updater program which can install the latest available version of Microsoft Edge to non-Debian-based Linux distros. diff --git a/msedge-updater.1 b/msedge-updater.1 index cef6a54..9c05b59 100644 --- a/msedge-updater.1 +++ b/msedge-updater.1 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.5 .\" -.TH "MSEDGE\-UPDATER" "1" "September 9, 2021" "updater 0.2.0" "User Manual" +.TH "MSEDGE\-UPDATER" "1" "December 9, 2021" "updater 0.2.1" "User Manual" .hy .SH NAME .PP diff --git a/msedge-updater.1.md b/msedge-updater.1.md index bec0959..97ef3b0 100644 --- a/msedge-updater.1.md +++ b/msedge-updater.1.md @@ -2,8 +2,8 @@ title: MSEDGE-UPDATER section: 1 header: User Manual -footer: updater 0.2.0 -date: September 9, 2021 +footer: updater 0.2.1 +date: December 9, 2021 --- # NAME diff --git a/updater.1 b/updater.1 deleted file mode 100644 index 9044150..0000000 --- a/updater.1 +++ /dev/null @@ -1,287 +0,0 @@ -.\" Automatically generated by Pandoc 2.5 -.\" -.TH "UPDATER" "1" "June 30, 2021" "updater 0.2.0" "User Manual" -.hy -.SH NAME -.PP -\f[C]updater\f[R] \[em] Automatically update Microsoft Edge on Solus -.SH SYNOPSIS -.PP -\f[B]\f[CB]updater\f[B]\f[R] [ \f[I]option\f[R] ] -.SH OPTIONS -.IP \[bu] 2 -\f[C]\-nn, \-\-no\-notify\f[R] -.PD 0 -.P -.PD -Prevent notifications from being sent after a session. -.IP \[bu] 2 -\f[C]\-c, \-\-set\-channel=\f[R] -.PD 0 -.P -.PD -Change the channel to be updated for Microsoft Edge. -Will default to the value defined in \f[C]source.list\f[R] if flag is -not present. -.RS 2 -.IP \[bu] 2 -beta \- update the Beta channel release. -.IP \[bu] 2 -dev \- update the Dev channel release. -.RE -.IP \[bu] 2 -\f[C]\-q, \-\-quiet\f[R] -.PD 0 -.P -.PD -Operate strictly with no output on \f[C]STDOUT\f[R] or \f[C]STDERR\f[R], -prompts will \f[B]NOT\f[R] assume yes however. -Logging still occurs in background. -.IP \[bu] 2 -\f[C]\-\-mode=\f[R] -.PD 0 -.P -.PD -Set the mode of the program to be ran in. -Default mode occurs without this flag. -.RS 2 -.IP \[bu] 2 -\f[B]\f[BI]debug\f[B]\f[R] \- run program in debug mode. -(\f[B]WIP\f[R]) -.RE -.IP \[bu] 2 -\f[C]\-\-full\-clean\f[R] -.PD 0 -.P -.PD -Remove all content generated by updater after a session, this includes -all logs. -.IP \[bu] 2 -\f[C]\-y, \-\-yes\-all\f[R] -.PD 0 -.P -.PD -Assume yes to all yes/no decisions. -.IP \[bu] 2 -\f[C]\-v, \-\-version\f[R] -.PD 0 -.P -.PD -Print out the version of the script and exit. -.IP \[bu] 2 -\f[C]\-h, \-\-help\f[R] -.PD 0 -.P -.PD -Print this help message and exit -.SH DESCRIPTION -.PP -Microsoft Edge Updater is a program which will download and update your -installation of Microsoft Edge to the latest release version identified. -The main script is \f[C]updater\f[R] and while the system is akin to a -package manager, it\[cq]s much, much simpler. -.PP -Systems that run Debian\-based distros (using the \f[C]apt\f[R] package -manager) or Fedora/openSUSE (using the \f[C]dnf\f[R] package manager), -should install Microsoft Edge to their package manager according to the -official guide over at Microsoft Edge Insider \- Command line -installation (https://www.microsoftedgeinsider.com/en-us/download/). -.PP -For those systems that use the amd64 architecture but not the perviously -mentioned bases/distros, or package managers, may benefit from this -program. -\f[C]updater\f[R] uses the Debian (\f[C].deb\f[R]) release versions of -Microsoft Edge and automatically installs them to your system so you -don\[cq]t have to again! -.SS NOTE -.PP -\f[C]updater\f[R] must be ran with root privileges. -If the script fails to identify its elevation, it will exit and display -a message to STDOUT. -.SS DISCLAIMER!! -.PP -Currently this program has only updated Microsoft Edge for amd64 -architectures, other architectures might be possible but not tested. -.SS Testing Systems -.PP -\f[C]updater\f[R] has been known to successfully run, download and -update Microsoft Edge (Beta) on Solus 4.2 Fortitude, Kernel version -5.11.21\-179 and later. -.PP -The test environment is a custom Docker image built from the Alpine -base. -Due to certain dependencies of Microsoft Edge, \f[C]updater\f[R] will -currently finish with exit code 11 on a successful session due to the -binary, \f[C]msedge\f[R], not being able to run. -This issue is only known for Busybox systems using \f[C]musl\f[R], and -not \f[C]glibc\f[R], which Microsoft Edge is built using. -.SH DEPENDENCIES -.IP \[bu] 2 -bash -.IP \[bu] 2 -wget -.IP \[bu] 2 -git -.IP \[bu] 2 -gunzip -.IP \[bu] 2 -tar -.IP \[bu] 2 -coreutils (>=8.32) -.IP \[bu] 2 -binutils (>=2.35.1) -.IP \[bu] 2 -procps (only Busybox\-based systems) -.SH FILES -.IP \[bu] 2 -\f[C]source.list\f[R] \[em] -.RS 2 -.PP -This file contains a list of URL end\-points to the official Microsoft -Edge packages page. -There are 3 lines with dedicated purposes: -.IP \[bu] 2 -\f[C][host]\f[R] \[em] -.PD 0 -.P -.PD -A URL to the front page of Microsoft\[cq]s Packages site, used to check -connectivity and if the site is reachable. -.IP \[bu] 2 -\f[C][dists]\f[R] \[em] -.PD 0 -.P -.PD -Most iconic line and resembles that of an APT entry for package -information. -This line can be broken into 4 parts -.RS 2 -.IP "1." 3 -\f[C][dists=amd64,]\f[R] \[em] -.PD 0 -.P -.PD -This tells the updater which package architecture it should download for -the system. -Comma delimited to that, determine which channel of Microsoft Edge to -update by default, and can be changed or override by flag arguments. -The default value of \f[C]dists\f[R] is \f[C]amd64,beta\f[R]. -.IP "2." 3 -\f[C]\f[R] \[em] -.PD 0 -.P -.PD -The URL which points to the distribution repository on the Microsoft -Packages server. -.IP "3." 3 -\f[C]main\f[R] \[em] -.PD 0 -.P -.PD -The main branch of the distribution repository. -.IP "4." 3 -\f[C]stable\f[R] \[em] -.PD 0 -.P -.PD -The type of release that should be installed to the system. -.RE -.IP \[bu] 2 -\f[C][pool]\f[R] \[em] -.PD 0 -.P -.PD -The prefix URL to the repository end\-point that stores the latest -releases. -The suffix comes from the Release information. -.RE -.IP \[bu] 2 -\f[C]logs/\f[R] \[em] -.RS 2 -.PP -This is a directory which holds the session and history logs. -.IP \[bu] 2 -\f[C]logs/updater.log\f[R] \[em] -.PD 0 -.P -.PD -A full report log of the previous update session. -Replaced after every next update session. -.IP \[bu] 2 -\f[C]logs/updater.history\f[R] \[em] -.PD 0 -.P -.PD -A history of all the previous update sessions. -Never replaced, only appended to after every next update session. -.RE -.IP \[bu] 2 -\f[C]utils/\f[R] \[em] -.RS 2 -.PP -Resource directory which contains any utility scripts. -These are stand\-alone; however, don\[cq]t have any specific purpose -being executed by a user. -.IP \[bu] 2 -\f[C]utils/common\f[R] \[em] -.PD 0 -.P -.PD -A utility file with common functions for updater. -.RE -.SH EXIT STATUS -.IP \[bu] 2 -0 \[em] Successful -.IP \[bu] 2 -1 \[em] General Error (Errors not severe enough to the cause of the -updater to stop) -.IP \[bu] 2 -2 \[em] Could not find \f[C]source.list\f[R] for the update -.IP \[bu] 2 -3 \[em] Host could not be reached. -Check Internet connectivity and/or host URL -.IP \[bu] 2 -4 \[em] Failed to download either the Packages information or Content -information files -.IP \[bu] 2 -5 \[em] Pool end\-point could not be reached -.IP \[bu] 2 -6 \[em] Failed to download the identified Debian (\f[C].deb\f[R]) file -from the host\[cq]s pool -.IP \[bu] 2 -7 \[em] Checksum verification of Debian (\f[C].deb\f[R]) file failed. -At this point, the downloaded file is removed -.IP \[bu] 2 -8 \[em] Failed to unarchive the Debian (\f[C].deb\f[R]) file or -decompress the \f[C]data.tar.gz\f[R] file -.IP \[bu] 2 -9 \[em] Failed to copy the new files to the system. -At this point, the backup is restored to the system to prevent -corruption -.IP \[bu] 2 -10 \[em] The archive function failed to create an archive of the system -.IP \[bu] 2 -11 \[em] If the system successfully restored files on an update failure, -the updater will exit with this code stating the update failed but -restoration was successful -.IP \[bu] 2 -12 \[em] The restore function failed to restore the files to their -original location -.IP \[bu] 2 -254 \[em] The channel to update cannot be identified. -Most likely cause is \f[C]source.list\f[R] is corrupt and \f[C]\-c\f[R] -was not passed. -.IP \[bu] 2 -255 \[em] EOF flag was set when reading the Packages information file -.IP \[bu] 2 -Other \[em] an exit code not related to updater may have been raised. -Consult the logs to identify which command returned the exit code. -.SH AUTHORS -.IP \[bu] 2 -Ethan Smith\-Coss -.SH CONTRIBUTORS -.IP \[bu] 2 -Robert Morrison \[em] Documentation -.SS Contacting -.PP -All contacts should be done through Issues on Gitea. From 17575484916ebacb9db9251d2df3053de0c09c08 Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Thu, 9 Dec 2021 17:33:01 +0000 Subject: [PATCH 4/6] Updated README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cce80df..6401587 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Currently this program can only update the Beta release of Microsoft Edge for am ## Usage ``` Usage: msedge-updater [OPTION] -Microsoft Edge Updater (0.2.0) - An updater program which can install the latest available version of Microsoft Edge to non-Debian-based Linux distros. +Microsoft Edge Updater (0.2.1) - An updater program which can install the latest available version of Microsoft Edge to non-Debian-based Linux distros. DISCLAIMER: Currently this program has only updated Microsoft Edge for amd64 architectures, other architectures might be possible but not tested. @@ -29,7 +29,7 @@ Options: ## Information * Program Name - Microsoft Edge Updater * Script Name - `msedge-updater` -* Version - 0.2.0 +* Version - 0.2.1 * Synopsis - update Microsoft Edge to the latest release. * Author(s) - Ethan Smith-Coss (No contact) * Contributors - Robert Morrison, Documentation From c25a6fc06259c30df20a2f03cc5c2788a687b5bf Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Tue, 15 Feb 2022 22:39:29 +0000 Subject: [PATCH 5/6] Updated README.md Updated contact information for Ethan. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6401587..363934b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Options: * Script Name - `msedge-updater` * Version - 0.2.1 * Synopsis - update Microsoft Edge to the latest release. -* Author(s) - Ethan Smith-Coss (No contact) +* Author(s) - Ethan Smith-Coss (ethan.sc@closedless.xyz) * Contributors - Robert Morrison, Documentation * License - GNU GPLv3+ From 4f58db256e13cd570571ca60b223b701aa57813b Mon Sep 17 00:00:00 2001 From: TheOnePath Date: Thu, 17 Feb 2022 23:27:03 +0000 Subject: [PATCH 6/6] Ammended bug fix The bug fix in commit 9ff1b6e has been re-addressed due to a potential edge case to cause another bug to occur as a result. This fix was implemented as a result from the review on PR: https://git.closedless.xyz/ClosedLess/Microsoft-Edge-Updater/pulls/1#issuecomment-8 --- msedge-updater | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msedge-updater b/msedge-updater index f8c68f3..0f16ad5 100755 --- a/msedge-updater +++ b/msedge-updater @@ -302,8 +302,8 @@ log "DEBUG" "There is a more recent release of Microsoft Edge ($edge_channel) av [[ ! $quiet -eq 0 ]] && >&2 echo "Identified a new release of Microsoft Edge ($edge_channel) [Current: v$current_version. New: v$release_version]. Starting the download and installation process..." ## check if msedge process is already running -is_running=$(ps -aux | grep -oc "msedge-$edge_channel") -if [[ $is_running -gt 1 ]] ; then +is_running="$(pidof msedge | xargs ps -ocmd -p | grep -m1 "msedge-$edge_channel")" +if [[ ! -z "$is_running" ]] ; then log "DEBUG" "Identified running processes for msedge. Determining how script should handle process..." "$log_file" if [[ ! $yes_flag -eq 0 ]] ; then echo -n "Microsoft Edge ($edge_channel) is already open. To continue update, the browser must be closed. Are you sure you wish to proceed? [(Y)es/No]: " && read -n 1 choice ; echo