Compare commits
4 Commits
cd0ba6b419
...
83e7b9200f
| Author | SHA1 | Date | |
|---|---|---|---|
| 83e7b9200f | |||
| 8bdf184511 | |||
| de547f5d3a | |||
| a2da04fec1 |
@@ -27,7 +27,7 @@ $ installJRMC --help
|
||||
--compat
|
||||
Build/install MC without minimum dependency version requirements
|
||||
--mcversion VERSION
|
||||
Build or install a specific MC version, ex. "33.0.30" (default: latest version)
|
||||
Build or install a specific MC version, ex. "33.0.30" or "33" (default: latest)
|
||||
--mcrepo REPO
|
||||
Specify the MC repository, ex. "bullseye", "bookworm", "noble", etc (default: latest official)
|
||||
--arch ARCH
|
||||
|
||||
71
installJRMC
71
installJRMC
@@ -16,7 +16,7 @@
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
declare -g SCRIPT_VERSION="1.3.7"
|
||||
declare -g SCRIPT_VERSION="1.3.8"
|
||||
declare -g MC_REPO="bullseye" # should match the MC_VERSION
|
||||
declare -g MC_VERSION="33.0.30" # Do find all replace
|
||||
declare -g BOARD_URL="https://yabb.jriver.com/interact/index.php/board,86.0.html" # MC33
|
||||
@@ -42,7 +42,7 @@ print_help() {
|
||||
--compat
|
||||
Build/install MC locally without minimum dependency version requirements
|
||||
--mcversion VERSION
|
||||
Specify the MC version, ex. "$MC_VERSION" (default: latest version)
|
||||
Specify the MC version, ex. "$MC_VERSION" or "${MC_VERSION%%.*}" (default: latest)
|
||||
--arch VERSION
|
||||
Specify the MC architecture, ex. "amd64", "arm64", etc (default: host architecture)
|
||||
--mcrepo REPO
|
||||
@@ -146,6 +146,24 @@ parse_input() {
|
||||
shift
|
||||
if [[ $1 =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
||||
USER_MC_VERSION="$1"
|
||||
elif [[ $1 =~ ([0-9][0-9]) ]]; then
|
||||
case $1 in
|
||||
33) ;; # use update check to determine latest version
|
||||
32) USER_MC_VERSION="32.0.58" ;;
|
||||
31) USER_MC_VERSION="31.0.83" ;;
|
||||
30) USER_MC_VERSION="30.0.96" ;;
|
||||
29) USER_MC_VERSION="29.0.91" ;;
|
||||
28) USER_MC_VERSION="28.0.110" ;;
|
||||
27) USER_MC_VERSION="27.0.88" ;;
|
||||
26) USER_MC_VERSION="26.0.107" ;;
|
||||
25) USER_MC_VERSION="25.0.114" ;;
|
||||
24) USER_MC_VERSION="24.0.78" ;;
|
||||
23) USER_MC_VERSION="23.0.104" ;;
|
||||
22) USER_MC_VERSION="22.0.102" ;;
|
||||
21) USER_MC_VERSION="21.0.90" ;;
|
||||
20) USER_MC_VERSION="20.0.131" ;;
|
||||
*) err "Bad --mcversion"; print_help; exit 1 ;;
|
||||
esac
|
||||
else
|
||||
err "Bad --mcversion"; print_help; exit 1
|
||||
fi
|
||||
@@ -288,7 +306,11 @@ init() {
|
||||
|
||||
# Match the MC repo to the system codename
|
||||
if [[ -z $USER_MC_REPO && ($ID == debian || $ID == ubuntu) ]]; then
|
||||
MC_REPO=${UBUNTU_CODENAME:-${VERSION_CODENAME:-$MC_REPO}}
|
||||
if [[ $UBUNTU_CODENAME == "oracular" ]]; then
|
||||
MC_REPO="noble" # TODO temporarily use noble repo for Ubuntu 24.10
|
||||
else
|
||||
MC_REPO=${UBUNTU_CODENAME:-${VERSION_CODENAME:-$MC_REPO}}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Use the correct repo for legacy MC versions
|
||||
@@ -299,6 +321,7 @@ init() {
|
||||
2[7-9]|30) USER_MC_REPO="buster" ;;
|
||||
31) USER_MC_REPO="bullseye" ;;
|
||||
# After this point, things get messy with multiple repos for the same MC version
|
||||
# Just use the default repo
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -560,28 +583,40 @@ install_mesa_freeworld() {
|
||||
install_mc_repo() {
|
||||
debug "Running: ${FUNCNAME[0]}"
|
||||
|
||||
local deb_repo_file="/etc/apt/sources.list.d/jriver.list"
|
||||
local rpm_repo_file="/etc/yum.repos.d/jriver.repo"
|
||||
local repo_file repo_text
|
||||
|
||||
case $ID in
|
||||
fedora|centos)
|
||||
sudo bash -c "cat <<-EOF > $rpm_repo_file
|
||||
repo_file="/etc/yum.repos.d/jriver.repo"
|
||||
read -r -d '' repo_text <<-EOF
|
||||
[jriver]
|
||||
name=JRiver Media Center by BryanC
|
||||
baseurl=https://repos.bryanroessler.com/jriver
|
||||
gpgcheck=0
|
||||
EOF"
|
||||
EOF
|
||||
;;
|
||||
debian|ubuntu)
|
||||
install_package wget
|
||||
debug "Installing JRiver Media Center RPM key"
|
||||
local major_version="${VERSION_ID%%.*}"
|
||||
local minor_version="${VERSION_ID##*.}"
|
||||
local keyfile="/usr/share/keyrings/jriver-com-archive-keyring.gpg"
|
||||
if [[ $ID == "ubuntu" ]] \
|
||||
&& [[ $major_version -gt 24 || ($major_version -eq 24 && $minor_version -ge 10) ]]; then
|
||||
repo_file="/etc/apt/sources.list.d/jriver.sources" # TODO new Ubuntu sources file format
|
||||
read -r -d '' repo_text <<-EOF
|
||||
Types: deb
|
||||
URIs: http://dist.jriver.com/latest/mediacenter/
|
||||
Signed-By: $keyfile
|
||||
Suites: noble
|
||||
Components: main
|
||||
EOF
|
||||
else
|
||||
repo_file="/etc/apt/sources.list.d/jriver.list"
|
||||
repo_text="deb [signed-by=$keyfile arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $MC_REPO main"
|
||||
fi
|
||||
install_package wget
|
||||
echo "Installing JRiver Media Center RPM key"
|
||||
wget --quiet --output-document=- http://dist.jriver.com/mediacenter@jriver.com.gpg.key |
|
||||
gpg --dearmor | sudo tee "$keyfile" &>/dev/null
|
||||
debug "Adding MC repository to $deb_repo_file"
|
||||
sudo bash -c "cat <<-EOF > $deb_repo_file
|
||||
deb [signed-by=$keyfile arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $MC_REPO main
|
||||
EOF"
|
||||
;;
|
||||
*)
|
||||
err "An MC repository for $ID is not yet available"
|
||||
@@ -590,6 +625,9 @@ install_mc_repo() {
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Adding MC repository to $repo_file"
|
||||
sudo tee "$repo_file" > /dev/null <<< "$repo_text"
|
||||
|
||||
if ! "${PKG_UPDATE[@]}"; then
|
||||
err "Package update failed!"
|
||||
return 1
|
||||
@@ -865,7 +903,7 @@ install_mc_deb() {
|
||||
install_mc_rhel() {
|
||||
debug "Running: ${FUNCNAME[0]}"
|
||||
|
||||
# Install mesa-va-freeworld separately from the RPM for dnf swap
|
||||
# Swap in freeworld hardware acceleration separately from the RPM
|
||||
install_mesa_freeworld
|
||||
|
||||
install_package --no-install-check --no-gpg-check --allow-downgrades "$MC_RPM"
|
||||
@@ -957,7 +995,7 @@ install_mc_arch() {
|
||||
popd &>/dev/null || return
|
||||
}
|
||||
|
||||
# @description Copy the RPM to createrepo-webroot and runs createrepo as the createrepo-user
|
||||
# @description Copy the RPM to createrepo-webroot and run createrepo as the createrepo-user
|
||||
run_createrepo() {
|
||||
debug "Running: ${FUNCNAME[0]}"
|
||||
|
||||
@@ -1576,10 +1614,9 @@ update() {
|
||||
main() {
|
||||
debug "Running: ${FUNCNAME[0]} $*"
|
||||
|
||||
echo "Starting installJRMC"
|
||||
echo "Starting installJRMC $SCRIPT_VERSION"
|
||||
if (( DEBUG )); then
|
||||
echo "Debugging on"
|
||||
echo "installJRMC version: $SCRIPT_VERSION"
|
||||
else
|
||||
echo "To enable debugging output, use --debug or -d"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user