Remove malformed debs automatically
This commit is contained in:
15
installJRMC
15
installJRMC
@@ -651,20 +651,27 @@ install_mc_repo() {
|
|||||||
acquire_deb() {
|
acquire_deb() {
|
||||||
debug "Running: ${FUNCNAME[0]}"
|
debug "Running: ${FUNCNAME[0]}"
|
||||||
|
|
||||||
declare -g MC_DEB="$OUTPUT_DIR/SOURCES/MediaCenter-$MC_VERSION-$ARCH.deb"
|
local fname="MediaCenter-$MC_VERSION-$ARCH.deb"
|
||||||
|
declare -g MC_DEB="$OUTPUT_DIR/SOURCES/$fname"
|
||||||
|
|
||||||
debug "MC_DEB=$MC_DEB"
|
debug "MC_DEB=$MC_DEB"
|
||||||
|
|
||||||
# If deb file already exists, skip download
|
# If deb file already exists, skip download
|
||||||
if [[ -f $MC_DEB ]]; then
|
if [[ -f $MC_DEB ]]; then
|
||||||
|
if [[ $(stat -c%s "$MC_DEB") -lt 10000000 ]]; then
|
||||||
|
echo "Removing existing DEB under 10MB: $MC_DEB"
|
||||||
|
execute rm "$MC_DEB"
|
||||||
|
else
|
||||||
echo "Using existing DEB: $MC_DEB"
|
echo "Using existing DEB: $MC_DEB"
|
||||||
|
fi
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Define the repositories to check
|
# Define the repositories to check
|
||||||
local repos=(
|
local repos=(
|
||||||
"https://files.jriver-cdn.com/mediacenter/channels/v$MVERSION/latest/MediaCenter-$MC_VERSION-$ARCH.deb"
|
"https://files.jriver-cdn.com/mediacenter/channels/v$MC_MVERSION/latest/$fname"
|
||||||
"https://files.jriver-cdn.com/mediacenter/test/MediaCenter-$MC_VERSION-$ARCH.deb"
|
"https://files.jriver-cdn.com/mediacenter/test/$fname"
|
||||||
"https://files.jriver-cdn.com/mediacenter/channels/v$MVERSION/beta/$BETAPASS/MediaCenter-$MC_VERSION-$ARCH.deb"
|
"https://files.jriver-cdn.com/mediacenter/channels/v$MC_MVERSION/beta/$BETAPASS/$fname"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Loop through the repositories and attempt to download
|
# Loop through the repositories and attempt to download
|
||||||
|
|||||||
Reference in New Issue
Block a user