program-rename (LTS) #1
21
README.md
21
README.md
|
|
@ -1,14 +1,14 @@
|
|||
<img src="msedge-updater-logo.png" width="150px" />
|
||||
|
||||
# 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]
|
||||
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.
|
||||
Usage: msedge-updater [OPTION]
|
||||
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.
|
||||
|
||||
|
|
@ -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,19 +28,20 @@ Options:
|
|||
|
||||
## Information
|
||||
* Program Name - Microsoft Edge Updater
|
||||
* Script Name - `updater`
|
||||
* Version - 0.2.0
|
||||
* 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+
|
||||
|
||||
## 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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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 #
|
||||
# Version: 0.2.1 #
|
||||
# Created: 2021-12-09T16:51+0000 #
|
||||
# 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 #
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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')
|
||||
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
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
.\" Automatically generated by Pandoc 2.5
|
||||
.\"
|
||||
.TH "UPDATER" "1" "June 30, 2021" "updater 0.2.0" "User Manual"
|
||||
.TH "MSEDGE\-UPDATER" "1" "December 9, 2021" "updater 0.2.1" "User Manual"
|
||||
.hy
|
||||
.SH NAME
|
||||
.PP
|
||||
\f[C]updater\f[R] \[em] Automatically update Microsoft Edge on Solus
|
||||
\f[C]msedge\-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] ]
|
||||
\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]
|
||||
|
|
@ -54,8 +55,8 @@ Default mode occurs without this flag.
|
|||
.PD 0
|
||||
.P
|
||||
.PD
|
||||
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.
|
||||
.IP \[bu] 2
|
||||
\f[C]\-y, \-\-yes\-all\f[R]
|
||||
.PD 0
|
||||
|
|
@ -78,8 +79,8 @@ Print this help message and exit
|
|||
.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.
|
||||
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),
|
||||
|
|
@ -90,12 +91,12 @@ installation (https://www.microsoftedgeinsider.com/en-us/download/).
|
|||
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!
|
||||
\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]updater\f[R] must be ran with root privileges.
|
||||
\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!!
|
||||
|
|
@ -104,15 +105,15 @@ 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
|
||||
\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]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.
|
||||
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
|
||||
|
|
@ -227,7 +228,7 @@ being executed by a user.
|
|||
.PD 0
|
||||
.P
|
||||
.PD
|
||||
A utility file with common functions for updater.
|
||||
A utility file with common functions for the updater.
|
||||
.RE
|
||||
.SH EXIT STATUS
|
||||
.IP \[bu] 2
|
||||
|
|
@ -274,7 +275,8 @@ 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.
|
||||
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
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
title: UPDATER
|
||||
title: MSEDGE-UPDATER
|
||||
section: 1
|
||||
header: User Manual
|
||||
footer: updater 0.2.0
|
||||
date: June 30, 2021
|
||||
footer: updater 0.2.1
|
||||
date: December 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
|
||||
|
|
@ -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 #
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user
This check works, However I can see a false positive scenario occuring.
If a long running command contains
msedge-$edge_channelthen it will be included in the ouput of the check.For example
Would give an output of 1 Even though msedge is not actually running.
I would suggest the use of a longer and slightly more verbose check.
In this check we:
pidof msedgeto return the PID(s) of any/all running msedge process(es)-ocmddefines the output as just the cmdline-ptells ps to just look for the given PID(s)It's also uneccesary to use the count flag in grep since no matches returns an empty result which is easy to test for.
EDIT: fix minortypo