Compare commits
3 Commits
3096f9fda1
...
4b63f6b2fc
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b63f6b2fc | |||
| bd636c281a | |||
| 381490c14c |
@@ -29,7 +29,7 @@ $ installJRMC --help
|
|||||||
--compat
|
--compat
|
||||||
Build/install MC without minimum dependency version requirements
|
Build/install MC without minimum dependency version requirements
|
||||||
--mcversion VERSION
|
--mcversion VERSION
|
||||||
Build or install a specific MC version, ex. "33.0.61" or "33" (default: latest)
|
Build or install a specific MC version, ex. "33.0.71" or "33" (default: latest)
|
||||||
--mcrepo REPO
|
--mcrepo REPO
|
||||||
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official)
|
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official)
|
||||||
--arch ARCH
|
--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.
|
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.61`
|
* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 33.0.71`
|
||||||
|
|
||||||
Build and install an MC 33.0.61 compatibility RPM locally and activate it using the `/path/to/license.mjr`
|
Build and install an MC 33.0.71 compatibility RPM locally and activate it using the `/path/to/license.mjr`
|
||||||
|
|
||||||
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`
|
* `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user`
|
||||||
|
|
||||||
|
|||||||
26
installJRMC
26
installJRMC
@@ -18,9 +18,9 @@
|
|||||||
# * Be careful with tabs in heredocs
|
# * Be careful with tabs in heredocs
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
declare -g SCRIPT_VERSION="1.4.7"
|
declare -g SCRIPT_VERSION="1.4.8"
|
||||||
declare -g MC_REPO="bullseye" # should match the MC_VERSION
|
declare -g MC_REPO="bullseye" # should match the MC_VERSION
|
||||||
declare -g MC_VERSION="33.0.61" # Do find all replace
|
declare -g MC_VERSION="33.0.71" # Do find all replace
|
||||||
declare -g BOARD_URL="https://yabb.jriver.com/interact/index.php/board,86.0.html" # MC33
|
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 -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://git.bryanroessler.com/bryan/installJRMC/raw/master/installJRMC"
|
||||||
@@ -115,9 +115,9 @@ print_help() {
|
|||||||
# @arg $@ User input
|
# @arg $@ User input
|
||||||
parse_input() {
|
parse_input() {
|
||||||
debug "Running: ${FUNCNAME[0]} $*"
|
debug "Running: ${FUNCNAME[0]} $*"
|
||||||
declare -gi BUILD_SWITCH=0 REPO_INSTALL_SWITCH=0 LOCAL_INSTALL_SWITCH=0 \
|
declare -gi BUILD_SWITCH REPO_INSTALL_SWITCH LOCAL_INSTALL_SWITCH \
|
||||||
CONTAINER_INSTALL_SWITCH=0 COMPAT_SWITCH=0 CREATEREPO_SWITCH=0 UNINSTALL_SWITCH=0 \
|
CONTAINER_INSTALL_SWITCH CREATEREPO_SWITCH \
|
||||||
YES_SWITCH=0 DEBUG=0
|
COMPAT_SWITCH UNINSTALL_SWITCH YES_SWITCH DEBUG=0
|
||||||
declare -g USER_MC_VERSION USER_MC_REPO MJR_FILE \
|
declare -g USER_MC_VERSION USER_MC_REPO MJR_FILE \
|
||||||
BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY BUILD_TARGET CREATEREPO_TARGET
|
BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY BUILD_TARGET CREATEREPO_TARGET
|
||||||
local long_opts short_opts input
|
local long_opts short_opts input
|
||||||
@@ -198,6 +198,14 @@ parse_input() {
|
|||||||
err "Incorrect option provided, see installJRMC --help"; exit 1
|
err "Incorrect option provided, see installJRMC --help"; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fallback to default install method in some scenarios
|
||||||
|
if ! ((UNINSTALL_SWITCH + BUILD_SWITCH + CREATEREPO_SWITCH +
|
||||||
|
LOCAL_INSTALL_SWITCH + CONTAINER_INSTALL_SWITCH)) &&
|
||||||
|
[[ ${#SERVICES[@]} -eq 0 && ${#CONTAINERS[@]} -eq 0 ]]; then
|
||||||
|
debug "Automatically using --install=repo"
|
||||||
|
REPO_INSTALL_SWITCH=1
|
||||||
|
fi
|
||||||
|
|
||||||
# Print some warnings for unsupported argument combinations
|
# Print some warnings for unsupported argument combinations
|
||||||
if [[ -n $USER_MC_REPO ]] && ((LOCAL_INSTALL_SWITCH)); then
|
if [[ -n $USER_MC_REPO ]] && ((LOCAL_INSTALL_SWITCH)); then
|
||||||
err "--install=local is not compatible with --mcrepo as only the default ($MC_REPO) DEB is available"
|
err "--install=local is not compatible with --mcrepo as only the default ($MC_REPO) DEB is available"
|
||||||
@@ -240,13 +248,7 @@ init() {
|
|||||||
USER="${SUDO_USER:-$USER}"
|
USER="${SUDO_USER:-$USER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Parse input commands with getopt
|
parse_input "$@"
|
||||||
if [[ $# -eq 0 || ! "$*" =~ (--install|--service|--container|--createrepo) ]]; then
|
|
||||||
debug "Automatically using --install=repo"
|
|
||||||
declare -gi REPO_INSTALL_SWITCH=1
|
|
||||||
else
|
|
||||||
parse_input "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run the self-updater if enabled
|
# Run the self-updater if enabled
|
||||||
((UPDATE_SWITCH)) && update "$@"
|
((UPDATE_SWITCH)) && update "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user