Print helper for future beta versions instead of scraping
This commit is contained in:
12
installJRMC
12
installJRMC
@@ -175,13 +175,11 @@ parse_input() {
|
|||||||
21) MC_VERSION_USER="${MC_VERSION_USER:-21.0.90}" MC_REPO_HARDCODE="jessie" BOARD_ID="44.0" ;;
|
21) MC_VERSION_USER="${MC_VERSION_USER:-21.0.90}" MC_REPO_HARDCODE="jessie" BOARD_ID="44.0" ;;
|
||||||
20) MC_VERSION_USER="${MC_VERSION_USER:-20.0.131}" MC_REPO_HARDCODE="jessie" BOARD_ID="35.0" ;;
|
20) MC_VERSION_USER="${MC_VERSION_USER:-20.0.131}" MC_REPO_HARDCODE="jessie" BOARD_ID="35.0" ;;
|
||||||
*)
|
*)
|
||||||
# Allow future major beta versions
|
# Warn for future major beta versions
|
||||||
if [[ $MC_MVERSION_USER -gt ${MC_VERSION_HARDCODE%%.*} ]]; then
|
if [[ $MC_MVERSION_USER -gt ${MC_VERSION_HARDCODE%%.*} ]]; then
|
||||||
echo "Using future major version, supply --betapass if necessary."
|
echo "Using future major version, supply full version number and --betapass."
|
||||||
BOARD_ID="13.0"
|
|
||||||
else
|
|
||||||
err "Bad --mcversion"; print_help; exit 1
|
|
||||||
fi
|
fi
|
||||||
|
err "Bad --mcversion"; print_help; exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
@@ -441,9 +439,7 @@ set_mc_version() {
|
|||||||
|
|
||||||
# Determine latest version
|
# Determine latest version
|
||||||
# Containerized package manager
|
# Containerized package manager
|
||||||
# Skip for beta versions (default to webscrape)
|
if create_mc_apt_container &&
|
||||||
if [[ -z $BETAPASS ]] &&
|
|
||||||
create_mc_apt_container &&
|
|
||||||
MC_VERSION=$(sudo buildah run "$CNT" -- apt-cache policy "mediacenter${MC_MVERSION_USER:-${MC_VERSION_HARDCODE%%.*}}" | awk '/Candidate:/ {sub(/-.*/, "", $2); print $2}' | sort -V | tail -n1) &&
|
MC_VERSION=$(sudo buildah run "$CNT" -- apt-cache policy "mediacenter${MC_MVERSION_USER:-${MC_VERSION_HARDCODE%%.*}}" | awk '/Candidate:/ {sub(/-.*/, "", $2); print $2}' | sort -V | tail -n1) &&
|
||||||
execute sudo buildah rm "$CNT" &&
|
execute sudo buildah rm "$CNT" &&
|
||||||
[[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
[[ $MC_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user