From 83dea7a0910727f14de23f5f819f4ba197e970d0 Mon Sep 17 00:00:00 2001 From: bryan Date: Tue, 21 May 2024 19:18:34 -0400 Subject: [PATCH] Add --base option to allow specifying MC debian base --- README.md | 8 +++++--- installJRMC | 14 ++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 649a176..ec895b5 100755 --- a/README.md +++ b/README.md @@ -23,9 +23,11 @@ $ installJRMC --help --compat Build/install MC without minimum dependency version requirements --mcversion VERSION - Build or install a specific MC version, ex. "32.0.6" (default: latest version) + Build or install a specific MC version, ex. "32.0.45" (default: latest version) --arch ARCH Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture) +--base DEBIAN_BASE + Specify the MC debian base, ex. "bullseye", "bookworm", "noble", etc (default: latest official) --outputdir PATH Generate rpmbuild output in this PATH (default: ./output) --restorefile RESTOREFILE @@ -112,9 +114,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 32.0.6` +* `installJRMC --install local --compat --restorefile /path/to/license.mjr --mcversion 32.0.45` - Build and install an MC 32.0.6 comptability RPM locally and activate it using the `/path/to/license.mjr` + Build and install an MC 32.0.45 comptability RPM locally and activate it using the `/path/to/license.mjr` * `installJRMC --createrepo --createrepo-webroot /srv/jriver/repo --createrepo-user www-user` diff --git a/installJRMC b/installJRMC index c4d9961..9d5a960 100755 --- a/installJRMC +++ b/installJRMC @@ -19,7 +19,7 @@ shopt -s extglob declare -g SCRIPTVERSION="1.0-dev" declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,83.0.html" # MC32 declare -g DEBIANBASE="bullseye" -declare -g MC_VERSION_HARDCODE="32.0.6" # Do find all replace +declare -g MC_VERSION_HARDCODE="32.0.45" # Do find all replace printHelp() { debug "Running: ${FUNCNAME[0]}" @@ -43,6 +43,8 @@ printHelp() { Specify the MC version, ex. "$MC_VERSION_HARDCODE" (default: latest version) --arch VERSION Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture) + --base DEBIAN_BASE + Specify the MC debian base, ex. "bullseye", "bookworm", "noble", etc (default: latest official) --outputdir PATH Generate rpmbuild output in this directory (default: ./output) --restorefile RESTOREFILE @@ -283,11 +285,12 @@ parseInput() { LOCAL_INSTALL_SWITCH=1 fi - long_opts="install:,build::,outputdir:,mcversion:,restorefile:,betapass:," + long_opts="install:,build::,outputdir:,mcversion:,arch:,base:,compat," + long_opts="restorefile:,betapass:," long_opts+="service-type:,service:,services:," - long_opts+="version,debug,verbose,help,uninstall,tests," + long_opts+="version,debug,verbose,help,uninstall,tests,yes,auto," long_opts+="createrepo::,createrepo-webroot:,createrepo-user:," - long_opts+="vncpass:,display:,container:,compat,arch:,yes,auto" + long_opts+="vncpass:,display:,container:" short_opts="+i:vb::dhus:c:" # Reset DEBUG and catch with getopt @@ -324,6 +327,9 @@ parseInput() { --arch) shift && USER_ARCH="$1" ;; + --base) + shift && declare -g DEBIANBASE="$1" + ;; --restorefile) shift && RESTOREFILE="$1" ;;