Fix --arch scope
This commit is contained in:
19
installJRMC
19
installJRMC
@@ -128,7 +128,7 @@ parseInput() {
|
|||||||
declare -g BUILD_SWITCH REPO_INSTALL_SWITCH COMPAT_SWITCH TEST_SWITCH
|
declare -g BUILD_SWITCH REPO_INSTALL_SWITCH COMPAT_SWITCH TEST_SWITCH
|
||||||
declare -g LOCAL_INSTALL_SWITCH CREATEREPO_SWITCH UNINSTALL_SWITCH
|
declare -g LOCAL_INSTALL_SWITCH CREATEREPO_SWITCH UNINSTALL_SWITCH
|
||||||
declare -g USER_VERSION_SWITCH
|
declare -g USER_VERSION_SWITCH
|
||||||
declare -g OUTPUTDIR RESTOREFILE BETAPASS SERVICE_TYPE
|
declare -g OUTPUTDIR RESTOREFILE BETAPASS SERVICE_TYPE USER_ARCH
|
||||||
declare -g VNCPASS USER_DISPLAY CREATEREPO_WEBROOT
|
declare -g VNCPASS USER_DISPLAY CREATEREPO_WEBROOT
|
||||||
declare -ga SERVICES CONTAINERS
|
declare -ga SERVICES CONTAINERS
|
||||||
declare long_opts short_opts input
|
declare long_opts short_opts input
|
||||||
@@ -180,7 +180,7 @@ parseInput() {
|
|||||||
;;
|
;;
|
||||||
--arch)
|
--arch)
|
||||||
shift
|
shift
|
||||||
ARCH="$1"
|
USER_ARCH="$1"
|
||||||
;;
|
;;
|
||||||
--restorefile)
|
--restorefile)
|
||||||
shift && RESTOREFILE="$1"
|
shift && RESTOREFILE="$1"
|
||||||
@@ -579,7 +579,10 @@ installMCFromRepo() {
|
|||||||
acquireDeb() {
|
acquireDeb() {
|
||||||
debug "Running: ${FUNCNAME[0]}"
|
debug "Running: ${FUNCNAME[0]}"
|
||||||
|
|
||||||
declare -g MCDEB="$OUTPUTDIR/SOURCES/MediaCenter-$MCVERSION-$ARCH.deb"
|
|
||||||
|
|
||||||
|
|
||||||
|
declare -g MCDEB="$OUTPUTDIR/SOURCES/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"
|
||||||
|
|
||||||
# If necessary, create SOURCES dir
|
# If necessary, create SOURCES dir
|
||||||
[[ -d "$OUTPUTDIR/SOURCES" ]] || execute "mkdir -p $OUTPUTDIR/SOURCES"
|
[[ -d "$OUTPUTDIR/SOURCES" ]] || execute "mkdir -p $OUTPUTDIR/SOURCES"
|
||||||
@@ -592,13 +595,13 @@ acquireDeb() {
|
|||||||
|
|
||||||
if [[ -v BETAPASS ]] &&
|
if [[ -v BETAPASS ]] &&
|
||||||
echo "Checking beta repo for DEB package" && wget -q -O "$MCDEB" \
|
echo "Checking beta repo for DEB package" && wget -q -O "$MCDEB" \
|
||||||
"https://files.jriver.com/mediacenter/channels/v$MVERSION/beta/$BETAPASS/MediaCenter-$MCVERSION-$ARCH.deb"; then
|
"https://files.jriver.com/mediacenter/channels/v$MVERSION/beta/$BETAPASS/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then
|
||||||
echo "Found!"
|
echo "Found!"
|
||||||
elif echo "Checking latest repo for DEB package" && 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-$ARCH.deb"; then
|
"https://files.jriver.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then
|
||||||
echo "Found!"
|
echo "Found!"
|
||||||
elif echo "Checking test repo for DEB package" && wget -q -O "$MCDEB" \
|
elif echo "Checking test repo for DEB package" && wget -q -O "$MCDEB" \
|
||||||
"https://files.jriver.com/mediacenter/test/MediaCenter-$MCVERSION-$ARCH.deb"; then
|
"https://files.jriver.com/mediacenter/test/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb"; then
|
||||||
echo "Found!"
|
echo "Found!"
|
||||||
else
|
else
|
||||||
err "Cannot find DEB file"
|
err "Cannot find DEB file"
|
||||||
@@ -727,7 +730,7 @@ buildRPM() {
|
|||||||
Release: 1
|
Release: 1
|
||||||
Summary: JRiver Media Center
|
Summary: JRiver Media Center
|
||||||
Group: Applications/Media
|
Group: Applications/Media
|
||||||
Source0: http://files.jriver.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-$ARCH.deb
|
Source0: http://files.jriver.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb
|
||||||
BuildArch: x86_64
|
BuildArch: x86_64
|
||||||
%define _rpmfilename %%{ARCH}/%%{NAME}-%%{version}.%%{ARCH}.rpm
|
%define _rpmfilename %%{ARCH}/%%{NAME}-%%{version}.%%{ARCH}.rpm
|
||||||
|
|
||||||
@@ -892,7 +895,7 @@ installMCARCH() {
|
|||||||
'vorbis-tools: ogg vorbis support'
|
'vorbis-tools: ogg vorbis support'
|
||||||
'musepack-tools: musepack support'
|
'musepack-tools: musepack support'
|
||||||
)
|
)
|
||||||
source=("http://files.jriver.com/mediacenter/channels/v30/latest/MediaCenter-$MCVERSION-$ARCH.deb")
|
source=("http://files.jriver.com/mediacenter/channels/v30/latest/MediaCenter-$MCVERSION-${USER_ARCH:-$ARCH}.deb")
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "\$srcdir"
|
cd "\$srcdir"
|
||||||
|
|||||||
Reference in New Issue
Block a user