Compare commits
3 Commits
363f67b425
...
ee154bf79c
| Author | SHA1 | Date | |
|---|---|---|---|
| ee154bf79c | |||
| c629846c8e | |||
| 2fbc329f1e |
@@ -29,7 +29,7 @@ $ installJRMC --help
|
||||
--compat
|
||||
Build/install MC without minimum dependency version requirements
|
||||
--mcversion VERSION
|
||||
Build or install a specific MC version, ex. "33.0.49" or "33" (default: latest)
|
||||
Build or install a specific MC version, ex. "33.0.61" or "33" (default: latest)
|
||||
--mcrepo REPO
|
||||
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official)
|
||||
--arch ARCH
|
||||
@@ -122,9 +122,9 @@ Multiple services (but not `--service-types`) can be installed at one time using
|
||||
|
||||
Install MC from the repository and start/enable `jriver-mediacenter.service` as a user service.
|
||||
|
||||
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 33.0.49`
|
||||
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 33.0.61`
|
||||
|
||||
Build and install an MC 33.0.49 compatibility RPM locally and activate it using the `/path/to/license.mjr`
|
||||
Build and install an MC 33.0.61 compatibility RPM locally and activate it using the `/path/to/license.mjr`
|
||||
|
||||
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`
|
||||
|
||||
|
||||
40
installJRMC
40
installJRMC
@@ -3,7 +3,7 @@
|
||||
# @file installJRMC
|
||||
# @brief Install JRiver Media Center and associated services
|
||||
# @description See installJRMC --help or print_help() below for usage
|
||||
# Copyright (c) 2021-2024 Bryan C. Roessler
|
||||
# Copyright (c) 2021-2025 Bryan C. Roessler
|
||||
# This software is released under the Apache License.
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
@@ -18,12 +18,13 @@
|
||||
# * Be careful with tabs in heredocs
|
||||
shopt -s extglob
|
||||
|
||||
declare -g SCRIPT_VERSION="1.4.6"
|
||||
declare -g SCRIPT_VERSION="1.4.7-dev"
|
||||
declare -g MC_REPO="bullseye" # should match the MC_VERSION
|
||||
declare -g MC_VERSION="33.0.49" # Do find all replace
|
||||
declare -g MC_VERSION="33.0.61" # Do find all replace
|
||||
declare -g BOARD_URL="https://yabb.jriver.com/interact/index.php/board,86.0.html" # MC33
|
||||
declare -gi UPDATE_SWITCH=1 # set to 0 to disable automatic self-update
|
||||
declare -g SCRIPT_URL="https://git.bryanroessler.com/bryan/installJRMC/raw/master/installJRMC"
|
||||
# declare -g SCRIPT_URL="https://raw.githubusercontent.com/cryobry/installJRMC/refs/heads/master/installJRMC"
|
||||
declare -gi DEBUG=${DEBUG:-0} # det default debug and allow DEBUG env override (default: disabled)
|
||||
|
||||
# @description Print help text
|
||||
@@ -1587,33 +1588,28 @@ update() {
|
||||
# Check if we're in a git directory and if it's the installJRMC repository
|
||||
if git -C "$SCRIPT_DIR" rev-parse --is-inside-work-tree &>/dev/null \
|
||||
&& [[ "$(git -C "$SCRIPT_DIR" config --get remote.origin.url)" == *"installJRMC"* ]]; then
|
||||
debug "installJRMC git repository detected. Running git pull"
|
||||
|
||||
# Get the current commit hash
|
||||
local before_pull_hash after_pull_hash
|
||||
before_pull_hash=$(git -C "$SCRIPT_DIR" rev-parse HEAD)
|
||||
|
||||
# Stash any local changes
|
||||
# Stash local changes before pull
|
||||
execute git -C "$SCRIPT_DIR" stash --quiet
|
||||
|
||||
# Pull latest changes
|
||||
debug "Running git pull in $SCRIPT_DIR"
|
||||
if ! git -C "$SCRIPT_DIR" pull | grep -q "Already up to date"; then
|
||||
# Get the new commit hash after pull
|
||||
after_pull_hash=$(git -C "$SCRIPT_DIR" rev-parse HEAD)
|
||||
|
||||
# Pull the latest changes
|
||||
debug "Executing git pull in $SCRIPT_DIR"
|
||||
if git -C "$SCRIPT_DIR" pull | grep -q "Already up to date"; then
|
||||
debug "No updates found in git repository."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Get the new commit hash after pull
|
||||
after_pull_hash=$(git -C "$SCRIPT_DIR" rev-parse HEAD)
|
||||
|
||||
# If the commit hash has changed, an update occurred
|
||||
if [[ "$before_pull_hash" != "$after_pull_hash" ]]; then
|
||||
echo "Detected installJRMC update, restarting"
|
||||
exec "$SCRIPT_PATH" "$@" "--no-update"
|
||||
else
|
||||
debug "Git pull did not change the commit hash. No update applied."
|
||||
return 0
|
||||
# If the commit hash has changed, an update occurred
|
||||
if [[ "$before_pull_hash" != "$after_pull_hash" ]]; then
|
||||
echo "Detected installJRMC update, restarting"
|
||||
execute git -C "$SCRIPT_DIR" stash pop
|
||||
exec "$SCRIPT_PATH" "$@" "--no-update"
|
||||
fi
|
||||
fi
|
||||
execute git -C "$SCRIPT_DIR" stash pop
|
||||
else
|
||||
debug "Not in a git repository or not the installJRMC repository. Checking for updates via download."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user