Compare commits
4 Commits
044aac9d6b
...
cd9e5d4e32
| Author | SHA1 | Date | |
|---|---|---|---|
| cd9e5d4e32 | |||
| f32a1a15c1 | |||
| c8b76d7eda | |||
| 795aa74152 |
18
installJRMC
18
installJRMC
@@ -16,7 +16,7 @@
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
declare -g SCRIPT_VERSION="1.3.0-dev"
|
||||
declare -g SCRIPT_VERSION="1.3.1"
|
||||
declare -g BOARD_URL="https://yabb.jriver.com/interact/index.php/board,86.0.html" # MC33
|
||||
declare -g MC_VERSION="33.0.15" # Do find all replace
|
||||
declare -g MC_DEFAULT_REPO="bullseye" # should match the MC_VERSION
|
||||
@@ -190,8 +190,6 @@ init() {
|
||||
|
||||
# Match the MC repo to the system
|
||||
if [[ $ID == debian || $ID == ubuntu ]]; then
|
||||
echo "Ubuntu codename: $UBUNTU_CODENAME"
|
||||
echo "Version codename: $VERSION_CODENAME"
|
||||
MC_DEFAULT_REPO=${UBUNTU_CODENAME:-${VERSION_CODENAME:-$MC_DEFAULT_REPO}}
|
||||
fi
|
||||
|
||||
@@ -1604,7 +1602,7 @@ update_self() {
|
||||
local script_url="https://git.bryanroessler.com/bryan/installJRMC/raw/master/installJRMC"
|
||||
local tmp; tmp=$(mktemp)
|
||||
|
||||
echo "Checking for installJRMC update"
|
||||
debug "Checking for installJRMC update"
|
||||
|
||||
# Function to extract and normalize version from a script
|
||||
extract_version() {
|
||||
@@ -1648,18 +1646,14 @@ update_self() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Compare versions and update if necessary
|
||||
local local_version
|
||||
local_version=$(extract_version "$SCRIPT_PATH")
|
||||
# Get latest version number
|
||||
local remote_version
|
||||
remote_version=$(extract_version "$tmp")
|
||||
|
||||
debug HERE
|
||||
|
||||
[[ -z $remote_version ]] && { rm -f "$tmp"; return 1; }
|
||||
|
||||
if [[ $local_version < $remote_version ]]; then
|
||||
echo "Newer version of installJRMC found. Updating..."
|
||||
# Compare versions and update if necessary
|
||||
if [[ $SCRIPT_VERSION < $remote_version ]]; then
|
||||
echo "Updating installJRMC $SCRIPT_VERSION to $remote_version"
|
||||
execute mv "$tmp" "$SCRIPT_PATH"
|
||||
execute chmod +x "$SCRIPT_PATH"
|
||||
exec "$SCRIPT_PATH" "$@" "--no-self-update"
|
||||
|
||||
Reference in New Issue
Block a user