20 Révisions

Auteur SHA1 Message Date
d61bdd4842 Bug squash 2022-01-13 22:33:22 -05:00
717a3f9f7f Bug squash 2022-01-13 22:24:49 -05:00
09a129e92c Bug squash 2022-01-13 22:18:26 -05:00
45697c0d9f Bug squash 2022-01-13 22:17:42 -05:00
1817c3ca79 Bug hunting 2022-01-13 22:15:47 -05:00
559a9eebae Formatting 2022-01-13 21:56:08 -05:00
72cdf25677 Bug hunting 2022-01-13 21:50:05 -05:00
1f939dd773 Formatting 2022-01-13 13:57:59 -05:00
46f92b7812 Wire up --target deb 2022-01-13 13:54:17 -05:00
22c2be25bc Fix --compat on deb distros 2022-01-13 13:26:05 -05:00
5f030454b9 make dpkg happy 2022-01-13 13:17:30 -05:00
41d84497f0 make dpkg happy 2022-01-13 13:16:35 -05:00
e85692e3fe Fix compat with legacy ar 2022-01-13 12:52:34 -05:00
fe0e467e9f Fix compat with legacy ar 2022-01-13 12:48:19 -05:00
0c0dbbe5f4 Formatting and sanity check 2022-01-13 12:31:32 -05:00
a4c9eb59c5 Formatting 2022-01-13 12:21:03 -05:00
7de3192603 Formatting 2022-01-13 12:20:15 -05:00
aeca1c6547 Formatting 2022-01-13 12:18:53 -05:00
00b286acb3 Formatting 2022-01-13 12:15:42 -05:00
0e7ef57142 Cleanup addrepo and make uninstall noisier 2022-01-13 12:05:55 -05:00
2 fichiers modifiés avec 148 ajouts et 107 suppressions

Voir le fichier

@@ -22,12 +22,11 @@ You can always find the latest supported options by running `installJRMC --help`
repo: Install MC from repository, future updates will be handled by the system package manager
rpm: Build and install MC locally (RPM-based OSes only)
deb: Download and install official MC package locally (useful with --compat flag for older distros)
--build
--build=[opensuse|fedora|centos]
Build RPM from source DEB but do not install
--target opensuse|fedora|centos
Crossbuild RPM for target distro
Specify cross-build target with optional argument, note '=' (ex. --build=opensuse)
--compat
Build/install RPM without minimum library specifiers
Build/install MC without minimum library specifiers
--mcversion VERSION
Build or install a specific MC version, ex. "28.0.25"
--outputdir PATH

Voir le fichier

@@ -24,9 +24,6 @@ declare -g OUTPUTDIR="$PWD/output"
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
declare -g USER; USER="${USER:-$(id -un)}"
# MC version
# MCVERSION="28.0.87" # to set manually, if unset use automatic latest check
printHelp() {
debug "Running: ${FUNCNAME[0]}"
@@ -41,10 +38,11 @@ printHelp() {
repo: Install MC from repository, updates are handled by the system package manager
rpm: Build and install RPM locally (RPM-based distros only)
deb: Download and install offcial MC package locally (useful with --compat flag for older distros)
--build
Build RPM from source DEB but do not install. Optional TARGET parameter enables RPM crossbuilding (ex. 'opensuse', 'fedora', 'centos')
--target opensuse|fedora|centos
Cross-build RPM or createrepo for target distro
--build=[opensuse|fedora|centos]
Build RPM from source DEB but do not install
Specify cross-build target with optional argument, note '=' (ex. --build=opensuse)
--compat
Build/install MC without minimum library specifiers
--mcversion VERSION
Specify the MC version, ex. "28.0.94" (Default: latest)
--outputdir PATH
@@ -65,8 +63,6 @@ printHelp() {
Specify the webroot directory to install the repo (Default: /var/www/jriver)
--createrepo-user USER
Specify the web server user if it differs from $USER
--compat
Build/install RPM without minimum library specifiers
--version, -v
Print this script version and exit
--debug, -d
@@ -126,16 +122,25 @@ getOS() {
parseInput() {
debug "Running: ${FUNCNAME[0]}"
declare -g RPM_BUILD_SWITCH REPO_INSTALL_SWITCH COMPAT_SWITCH CREATEREPO_SWITCH UNINSTALL_SWITCH DEB_INSTALL_SWITCH
declare -g TARGET OUTPUTDIR MCVERSION RESTOREFILE BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY CREATEREPO_WEBROOT CREATEREPO_USER
declare -g BUILD_SWITCH REPO_INSTALL_SWITCH COMPAT_SWITCH
declare -g CREATEREPO_SWITCH UNINSTALL_SWITCH DEB_INSTALL_SWITCH
declare -g TARGET OUTPUTDIR MCVERSION RESTOREFILE BETAPASS SERVICE_TYPE
declare -g VNCPASS USER_DISPLAY CREATEREPO_WEBROOT CREATEREPO_USER
declare -ga SERVICES CONTAINERS
declare long_opts short_opts
if [[ $# -eq 0 ]] || [[ $# -eq 1 && "$1" =~ ^(--debug|-d)$ ]]; then
echo "No options passed, defaulting to repo installation method"
REPO_INSTALL_SWITCH=1
elif [[ $# -eq 1 && "$1" =~ ^(--compat)$ ]]; then
TARGET="$ID"
fi
if _input=$(getopt -o +i:vdhus:c: -l install:,build,target:,outputdir:,mcversion:,restorefile:,betapass:,service-type:,service:,version,debug,help,uninstall,createrepo,createrepo-webroot:,createrepo-user:,vncpass:,display:,container:,tests,compat -- "$@"); then
long_opts="install:,build::,outputdir:,mcversion:,restorefile:,betapass:,"
long_opts+="service-type:,service:,version,debug,help,uninstall,createrepo,"
long_opts+="createrepo-webroot:,createrepo-user:,vncpass:,display:,container:,tests,compat"
short_opts="+i:vb::dhus:c:"
if _input=$(getopt -o $short_opts -l $long_opts -- "$@"); then
eval set -- "$_input"
while true; do
case "$1" in
@@ -143,10 +148,11 @@ parseInput() {
shift
case "$1" in
rpm)
RPM_BUILD_SWITCH=1
BUILD_SWITCH=1
RPM_INSTALL_SWITCH=1
;;
deb)
BUILD_SWITCH=1
DEB_INSTALL_SWITCH=1
;;
repo)
@@ -154,10 +160,8 @@ parseInput() {
;;
esac
;;
--build)
RPM_BUILD_SWITCH=1
;;
--target)
--build|-b)
BUILD_SWITCH=1
shift && TARGET="$1"
;;
--outputdir)
@@ -179,7 +183,7 @@ parseInput() {
shift && SERVICES+=("$1")
;;
--createrepo)
RPM_BUILD_SWITCH=1
BUILD_SWITCH=1
CREATEREPO_SWITCH=1
;;
--createrepo-webroot)
@@ -230,6 +234,8 @@ parseInput() {
err "Incorrect options provided"
printHelp && exit 1
fi
! debug && echo "Use --debug for verbose output"
}
@@ -273,6 +279,7 @@ getLatestVersion() {
# Options:
# --skip-check-installed: Do not check if package is already installed
# --nogpgcheck: Disable GPG checks for RPM based distros
# --allow-downgrades: Useful for installing compatability versions on DEB based distros
# --silent, -s: Do not report errors (useful if package is not strictly required and errors are noisy)
#######################################
installPackage() {
@@ -281,13 +288,16 @@ installPackage() {
declare -a pkg_array install_flags
declare pkg skip_check_installed silent _return pkg_install_cmd
if _input=$(getopt -o +s -l skip-check-installed,nogpgcheck,silent -- "$@"); then
if _input=$(getopt -o +s -l skip-check-installed,allow-downgrades,nogpgcheck,silent -- "$@"); then
eval set -- "$_input"
while true; do
case "$1" in
--skip-check-installed)
skip_check_installed=1
;;
--allow-downgrades)
[[ "$ID" =~ (debian|ubuntu|linuxmint|neon) ]] && install_flags+=(--allow-downgrades)
;;
--nogpgcheck)
if [[ "$ID" =~ ^(fedora|centos)$ ]]; then
install_flags+=(--nogpgcheck)
@@ -334,7 +344,7 @@ installPackage() {
pkg_install_cmd="pkg_install ${install_flags[*]} ${pkg_array[*]}"
debug "$pkg_install_cmd" || pkg_install_cmd+=" &>/dev/null"
if ! eval "$pkg_install_cmd"; then
(( silent )) || err "Failed to install ${pkg_array[*]}. Attempting to continue..."
(( silent )) || err "Failed to install ${pkg_array[*]}. Attempting to continue"
return 1
fi
fi
@@ -342,30 +352,67 @@ installPackage() {
}
#######################################
# Installs a package using the system package manager
# Arguments:
# One or more package names
# Options:
# --skip-check-installed: Do not check if package is already installed
# --nogpgcheck: Disable GPG checks for RPM based distros
# --allow-downgrades: Useful for installing compatability versions on DEB based distros
# --silent, -s: Do not report errors (useful if package is not strictly required and errors are noisy)
#######################################
installMCDEB() {
debug "Running: ${FUNCNAME[0]}"
aquireDeb
declare mcdeb="$MCDEB"
declare pkg_install_cmd="installPackage --skip-check-installed --nogpgcheck"
if (( COMPAT_SWITCH )); then
declare extract_dir && extract_dir="$(mktemp -d)"
mcdeb="${MCDEB/.deb/.compat.deb}"
pushd "$extract_dir" &>/dev/null || return $?
ar x "$MCDEB"
tar -xJf "control.tar.xz"
# Remove minimum version specifiers from control file
sed -i 's/ ([^)]*)//g' "control"
sed -i 's/([^)]*)//g' "control" # TODO MC DEB package error
tar -cJf "control.tar.xz" "control" "postinst"
ar rcs "$mcdeb" "debian-binary" "control.tar.xz" "data.tar.xz"
popd &>/dev/null || return $?
rm -rf "$extract_dir"
pkg_install_cmd+=" --allow-downgrades"
fi
pkg_install_cmd+=" $mcdeb"
debug "$pkg_install_cmd" || pkg_install_cmd+=" &>/dev/null"
eval "$pkg_install_cmd"
}
#######################################
# Add the JRiver repository files
#######################################
addRepo() {
debug "Running: ${FUNCNAME[0]}"
echo "Adding JRiver repository"
echo "Adding JRiver repository to package manager"
if [[ "$ID" =~ ^(fedora|centos)$ ]]; then
sudo bash -c 'cat <<- EOF > /etc/yum.repos.d/jriver.repo
declare sources_dir="/etc/yum.repos.d/"
sudo bash -c "cat <<- EOF > $sources_dir/jriver.repo
[jriver]
name=JRiver Media Center repo by BryanC
baseurl=https://repos.bryanroessler.com/jriver
gpgcheck=0
EOF'
EOF"
elif [[ "$ID" =~ ^(debian|ubuntu|linuxmint|neon)$ ]]; then
# MVERSION depends on $BASE unless --mcversion is passed
installPackage wget
declare sources_dir="/etc/apt/sources.list.d"
[[ ! -d "$sources_dir" ]] && sudo mkdir -p "$sources_dir"
sudo bash -c "cat <<- EOF > $sources_dir/mediacenter$MVERSION.list
[[ ! -d $sources_dir ]] && sudo mkdir -p "$sources_dir"
sudo rm -rf "$sources_dir"/mediacenter*.list
sudo bash -c "cat <<- EOF > $sources_dir/jriver.list
deb [trusted=yes arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $BASE main
EOF"
#echo "deb [trusted=yes arch=amd64,i386,armhf,arm64] http://dist.jriver.com/latest/mediacenter/ $BASE main" > "$sources_dir/mediacenter$MVERSION.list" 2>&1
#sudo wget "http://dist.jriver.com/latest/mediacenter/mediacenter$MVERSION.list" -O "/etc/apt/sources.list.d/mediacenter$MVERSION.list" &>/dev/null
wget -q "http://dist.jriver.com/mediacenter@jriver.com.gpg.key" -O- | sudo apt-key add - &>/dev/null
elif [[ "$ID" =~ ^opensuse.* ]]; then
sudo zypper addrepo --no-gpgcheck "https://repos.bryanroessler.com/jriver" jriver &>/dev/null
@@ -379,14 +426,6 @@ addRepo() {
installMCFromRepo() {
debug "Running: ${FUNCNAME[0]}"
echo "Installing JRiver Media Center $MCVERSION from repository."
echo "Future updates will be handled by your package manager."
if ! debug; then
echo "This may take a few minutes to complete."
echo "Use --debug for verbose output."
fi
addRepo
# Update package list
@@ -397,6 +436,7 @@ installMCFromRepo() {
exit 1
fi
echo "Installing JRiver Media Center using your package manager"
pkg_install_cmd="installPackage --skip-check-installed --nogpgcheck $MCPKG"
debug "$pkg_install_cmd" || pkg_install_cmd+=" &>/dev/null"
eval "$pkg_install_cmd"
@@ -416,30 +456,32 @@ acquireDeb() {
# If deb file already exists, skip download
if [[ -f "$MCDEB" ]]; then
echo "Using local DEB file: $MCDEB"
echo "Using local source DEB: $MCDEB"
return 0
fi
if [[ -v BETAPASS ]]; then
echo "Checking beta repo..."
echo "Checking beta repo for DEB package"
if wget -q -O "$MCDEB" \
"https://files.jriver.com/mediacenter/channels/v$MVERSION/beta/$BETAPASS/MediaCenter-$MCVERSION-amd64.deb"; then
echo "Found!"
fi
elif echo "Checking test repo..." && wget -q -O "$MCDEB" \
elif echo "Checking test repo for DEB package" && wget -q -O "$MCDEB" \
"https://files.jriver.com/mediacenter/test/MediaCenter-$MCVERSION-amd64.deb"; then
echo "Found!"
# Else check latest repo
elif echo "Checking latest repo..." && wget -q -O "$MCDEB" \
elif echo "Checking latest repo for DEB package" && wget -q -O "$MCDEB" \
"https://files.jriver.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-amd64.deb"; then
echo "Found!"
else
err "Cannot find DEB file."
err "Cannot find DEB file"
exit 1
fi
if [[ ! -f "$MCDEB" ]]; then
err "Downloaded DEB file missing or corrupted."
if [[ -f "$MCDEB" ]]; then
echo "Downloaded MC $MCVERSION DEB to: $MCDEB"
else
err "Downloaded DEB file missing or corrupted"
exit 1
fi
}
@@ -458,7 +500,7 @@ buildRPM() {
# skip rebuilding the rpm if it already exists
if [[ -f "$MCRPM" ]]; then
echo "$MCRPM already exists. Skipping build step."
echo "$MCRPM already exists. Skipping build step"
return 0
fi
@@ -466,6 +508,11 @@ buildRPM() {
# Use --target parameter override
id="${TARGET:-$ID}"
if [[ ! "$id" =~ (fedora|centos|opensuse.*) ]]; then
err "The current RPM build target $id is not supported, manually specify with --target"
err "The DEB file is located at $MCDEB"
return 1
fi
# Load deb dependencies into array
IFS=',' read -ra requires <<< "$(dpkg-deb -f "$MCDEB" Depends)"
@@ -609,13 +656,14 @@ buildRPM() {
EOF
# Run rpmbuild
echo "Building version $MCVERSION, please wait..."
rpmbuild_cmd="rpmbuild --define=\"%_topdir $OUTPUTDIR\" --define=\"%_libdir /usr/lib\" -bb $OUTPUTDIR/SPECS/mediacenter.spec"
echo "Building RPM for MC $MCVERSION, this may take awhile"
rpmbuild_cmd="rpmbuild --define=\"%_topdir $OUTPUTDIR\" --define=\"%_libdir /usr/lib\" -bb"
rpmbuild_cmd+=" $OUTPUTDIR/SPECS/mediacenter.spec"
debug "$rpmbuild_cmd" || rpmbuild_cmd+=" &>/dev/null"
if eval "$rpmbuild_cmd" && [[ -f "$MCRPM" ]] ; then
echo "Build successful. The RPM file is located at: $MCRPM"
else
err "Build failed."
err "Build failed"
# For automation, let's remove the source DEB and reaquire it on next run
# after failure in case it is corrupted or buggy
[[ -f "$MCDEB" ]] && echo "Removing source DEB" && rm -f "$MCDEB"
@@ -729,7 +777,7 @@ restoreLicense() {
#######################################
# Opens ports using the system firewall tool
# Arguments
# Arguments:
# Pre-defined service to enable
#######################################
openFirewall() {
@@ -770,7 +818,7 @@ openFirewall() {
ports=$u_ports
EOF"
fi
firewall_cmd app update "$1"
firewall_cmd app update "$1" &>/dev/null
firewall_cmd allow "$1" &>/dev/null
fi
@@ -863,12 +911,14 @@ setDisplay() {
#######################################
# Create associated service variables based on service name
# Arguments
# Pre-defined service to enable
#######################################
setServiceVars() {
debug "Running: ${FUNCNAME[0]}"
declare -g SERVICE_NAME SERVICE_FNAME TIMER_NAME TIMER_FNAME USER_STRING
declare -g SERVICE_TYPE"${SERVICE_TYPE:-system}"
declare -g SERVICE_TYPE="${SERVICE_TYPE:-system}"
declare service_dir="/usr/lib/systemd/$SERVICE_TYPE"
if [[ "$USER" == "root" && "$SERVICE_TYPE" == "user" ]]; then
@@ -917,7 +967,7 @@ setServiceVars() {
service_jriver-mediacenter() {
debug "Running: ${FUNCNAME[0]}"
setServiceVars
setServiceVars "${FUNCNAME[0]##*_}"
sudo bash -c "cat <<- EOF > $SERVICE_FNAME
[Unit]
@@ -951,7 +1001,7 @@ service_jriver-mediacenter() {
service_jriver-mediaserver() {
debug "Running: ${FUNCNAME[0]}"
setServiceVars
setServiceVars "${FUNCNAME[0]##*_}"
service_jriver-mediacenter "/MediaServer"
}
@@ -963,7 +1013,7 @@ service_jriver-mediaserver() {
service_jriver-xvnc() {
debug "Running: ${FUNCNAME[0]}"
setServiceVars
setServiceVars "${FUNCNAME[0]##*_}"
setDisplay
declare start_cmd
declare -g PORT=$(( NEXT_DISPLAYNUM + 5900 ))
@@ -995,6 +1045,8 @@ service_jriver-xvnc() {
WantedBy=multi-user.target
EOF"
debug "DONE"
systemctl_reload_cmd &&
systemctl_enable_cmd "$SERVICE_NAME" &&
echo "Xvnc running on localhost:$PORT" &&
@@ -1009,7 +1061,7 @@ service_jriver-xvnc() {
service_jriver-x11vnc() {
debug "Running: ${FUNCNAME[0]}"
setServiceVars
setServiceVars "${FUNCNAME[0]##*_}"
setDisplay
declare start_cmd
@@ -1069,9 +1121,9 @@ service_jriver-createrepo() {
declare cr_user="${CREATEREPO_USER:$USER}"
if [[ "$USER" != "$cr_user" ]]; then
USER="root" SERVICE_TYPE="system" setServiceVars
USER="root" SERVICE_TYPE="system" setServiceVars "${FUNCNAME[0]##*_}"
else
setServiceVars
setServiceVars "${FUNCNAME[0]##*_}"
fi
sudo bash -c "cat <<-EOF > $SERVICE_FNAME
@@ -1204,7 +1256,7 @@ service_jriver-createrepo() {
# # Metadata.
# LABEL \
# org.label-schema.name="jrivermc${jriver_release}" \
# org.label-schema.description="Docker image for JRiver Media Center ${jriver_release}." \
# org.label-schema.description="Docker image for JRiver Media Center ${jriver_release}" \
# org.label-schema.version="${image_version}" \
# org.label-schema.vcs-url="https://gitlab.com/shiomax/jrivermc-docker" \
# org.label-schema.schema-version="1.0"
@@ -1269,7 +1321,7 @@ uninstall() {
exit 0
fi
debug "Stopping and removing all associated Media Center services"
echo "Stopping and removing all Media Center services"
for service in $(compgen -A "function" "service"); do
service="${service##service_}"
SERVICE_TYPE=system setServiceVars "$service";
@@ -1297,16 +1349,15 @@ uninstall() {
systemctl_reload_cmd
done
debug "Removing repo files"
[[ -f "/etc/yum.repos.d/jriver.repo" ]] &&
sudo rm -f "/etc/yum.repos.d/jriver.repo"
[[ -f "/etc/apt/sources.list.d/jriver.list" ]] &&
sudo rm -f "/etc/apt/sources.list.d/jriver.list"
echo "Removing repo files"
sudo rm -rf \
"/etc/yum.repos.d/jriver.repo" \
/etc/apt/sources.list.d/{jriver,mediacenter}*.list # also remove legacy repo files
if [[ "$ID" =~ ^opensuse.* ]]; then
sudo zypper rr jriver &>/dev/null
fi
debug "Removing firewall rules"
echo "Removing firewall rules"
if hash firewall-cmd 2>/dev/null; then
if [[ -v debug ]]; then
debug "firewall_cmd --permanent --remove-service=jriver"
@@ -1328,11 +1379,11 @@ uninstall() {
sudo rm -f /etc/ufw/applications.d/jriver
fi
debug "Uninstalling Media Center package"
echo "Uninstalling Media Center package"
mc_pkg_rm_cmd="pkg_remove $MCPKG"
debug "$mc_pkg_rm_cmd" || mc_pkg_rm_cmd+=" &>/dev/null"
if eval "$mc_pkg_rm_cmd"; then
echo "JRiver Media Center has been completely uninstalled."
echo "JRiver Media Center has been completely uninstalled"
echo "To remove your library files, run: rm -rf $HOME/.jriver"
echo "To remove your rpmbuild output files, run: rm -rf $OUTPUTDIR"
exit 0
@@ -1356,7 +1407,7 @@ main() {
getOS
# Some distros need external repos installed for MC libraries
if [[ "$ID" == "ubuntu|neon" ]]; then
if [[ "$ID" =~ (ubuntu|linuxmint|neon) ]]; then
echo "Adding universe repository"
if ! grep ^deb /etc/apt/sources.list|grep -q universe; then
sudo add-apt-repository universe
@@ -1418,14 +1469,33 @@ main() {
if (( REPO_INSTALL_SWITCH )); then
if [[ "$ID" =~ ^opensuse.*$ ]]; then
echo "A SUSE repository is not yet available."
echo "Use --install rpm to build and install a SUSE RPM instead."
echo "A SUSE repository is not yet available"
echo "Use --install rpm to build and install a SUSE RPM instead"
exit 1
elif installMCFromRepo; then
echo "JRiver Media Center installed successfully from repo"
symlinkCerts
restoreLicense
openFirewall "jriver"
else
err "JRiver Media Center installation from repo failed"
exit 1
fi
if installMCFromRepo; then
echo "JRiver Media Center installed successfully"
fi
if (( BUILD_SWITCH )); then
installPackage "wget" "dpkg" "rpm-build"
acquireDeb
if [[ "$TARGET" =~ ^(fedora|centos|opensuse.*) ]]; then
buildRPM
fi
fi
if (( DEB_INSTALL_SWITCH )); then
if installMCDEB; then
echo "JRiver Media Center installed successfully from local deb"
else
err "JRiver Media Center installation failed"
err "JRiver Media Center installation from local deb failed"
exit 1
fi
symlinkCerts
@@ -1433,40 +1503,12 @@ main() {
openFirewall "jriver"
fi
if (( DEB_INSTALL_SWITCH )); then
acquireDeb
if (( COMPAT_SWITCH )); then
declare extract_dir && extract_dir="$(mktemp -d)"
ar x --output "$extract_dir" "$MCDEB"
tar -xJf "$extract_dir/control.tar.xz" -C "$extract_dir"
# Remove minimum version specifiers from control file
sed -i 's/ ([^)]*)//g' "$extract_dir/control"
sed -i 's/([^)]*)//g' "$extract_dir/control" # MC DEB package error
tar -cJf "$extract_dir/control.tar.xz" \
-C "$extract_dir" "control" "postinst"
declare mcdeb="$MCDEB.compat"
ar rcs "$mcdeb" "$extract_dir/debian-binary" "$extract_dir/control.tar.xz" "$extract_dir/data.tar.xz"
rm -rf "$extract_dir"
fi
pkg_install_cmd="installPackage --skip-check-installed --nogpgcheck ${mcdeb:-$MCDEB}"
debug "$pkg_install_cmd" || pkg_install_cmd+=" &>/dev/null"
eval "$pkg_install_cmd"
fi
if (( RPM_BUILD_SWITCH )); then
installPackage "wget" "dpkg" "rpm-build"
acquireDeb
buildRPM
fi
if (( RPM_INSTALL_SWITCH )); then
#rpm --upgrade "$MCRPM" # TODO, maybe universalize for RPM distros
if installPackage --skip-check-installed --nogpgcheck "$MCRPM"; then
echo "JRiver Media Center installed successfully"
echo "JRiver Media Center installed successfully from local RPM"
else
err "JRiver Media Center installation failed"
err "JRiver Media Center installation from local RPM failed"
exit 1
fi
symlinkCerts