Leave it up to the user for now
This commit is contained in:
58
installJRMC
58
installJRMC
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
_scriptversion="1.0b4"
|
_scriptversion="1.0b5"
|
||||||
_outputdir="$PWD/output"
|
_outputdir="$PWD/output"
|
||||||
_createrepo_webroot="/var/www/jriver"
|
_createrepo_webroot="/var/www/jriver"
|
||||||
_exec_user="$(whoami)"
|
_exec_user="$(whoami)"
|
||||||
@@ -173,7 +173,7 @@ init() {
|
|||||||
[[ ! "$_mcversion" =~ ([0-9]+.[0-9]+.[0-9]+) ]] && err "Invalid version number" && exit 1
|
[[ ! "$_mcversion" =~ ([0-9]+.[0-9]+.[0-9]+) ]] && err "Invalid version number" && exit 1
|
||||||
|
|
||||||
echo "Using MC version $_mcversion determined by $_version_source"
|
echo "Using MC version $_mcversion determined by $_version_source"
|
||||||
echo "To override, use --mcversion"
|
[[ "$_version_source" != "user input" ]] && echo "To override, use --mcversion"
|
||||||
|
|
||||||
# Extract major version number
|
# Extract major version number
|
||||||
_mversion="${_mcversion%%.*}"
|
_mversion="${_mcversion%%.*}"
|
||||||
@@ -353,34 +353,34 @@ getLatestVersion() {
|
|||||||
# This can be overriden w/ --mcversion
|
# This can be overriden w/ --mcversion
|
||||||
# TODO need user input here
|
# TODO need user input here
|
||||||
# disable version checks for createrepo or rpmbuild (servers)
|
# disable version checks for createrepo or rpmbuild (servers)
|
||||||
if [[ -v _install ]]; then
|
# if [[ -v _install ]]; then
|
||||||
if [[ "$ID" == "ubuntu" ]]; then
|
# if [[ "$ID" == "ubuntu" ]]; then
|
||||||
# [[ "$VERSION_CODENAME" =~ ^(focal|groovy|hirsute|impish)$ ]] && \
|
# # [[ "$VERSION_CODENAME" =~ ^(focal|groovy|hirsute|impish)$ ]] && \
|
||||||
# _base="bullseye"
|
# # _base="bullseye"
|
||||||
[[ "$VERSION_CODENAME" =~ ^(cosmic|disco|eoan)$ ]] && \
|
# [[ "$VERSION_CODENAME" =~ ^(cosmic|disco|eoan)$ ]] && \
|
||||||
_base="buster"
|
# _base="buster"
|
||||||
[[ "$VERSION_CODENAME" =~ ^(xenial|yakkety|zesty|artful|bionic)$ ]] && \
|
# [[ "$VERSION_CODENAME" =~ ^(xenial|yakkety|zesty|artful|bionic)$ ]] && \
|
||||||
_mcversion="26.0.107"
|
# _mcversion="26.0.107"
|
||||||
[[ "$VERSION_CODENAME" =~ ^(trusty|utopic|vivid|wily)$ ]] && \
|
# [[ "$VERSION_CODENAME" =~ ^(trusty|utopic|vivid|wily)$ ]] && \
|
||||||
_mcversion="26.0.107"
|
# _mcversion="26.0.107"
|
||||||
elif [[ "$ID" == "debian" ]]; then
|
# elif [[ "$ID" == "debian" ]]; then
|
||||||
_base="$VERSION_CODENAME"
|
# _base="$VERSION_CODENAME"
|
||||||
[[ $VERSION_ID -eq 10 ]] && \
|
# [[ $VERSION_ID -eq 10 ]] && \
|
||||||
_base="buster"
|
# _base="buster"
|
||||||
[[ $VERSION_ID -le 9 ]] && \
|
# [[ $VERSION_ID -le 9 ]] && \
|
||||||
_mcversion="26.0.107" # For 9 and 8
|
# _mcversion="26.0.107" # For 9 and 8
|
||||||
elif [[ "$ID" == "centos" ]]; then
|
# elif [[ "$ID" == "centos" ]]; then
|
||||||
[[ "$VERSION_ID" -eq "8" ]] && \
|
# [[ "$VERSION_ID" -eq "8" ]] && \
|
||||||
_base="buster"
|
# _base="buster"
|
||||||
[[ "$VERSION_ID" -lt "8" ]] && \
|
# [[ "$VERSION_ID" -lt "8" ]] && \
|
||||||
_mcversion="26.0.107" # Doubtful
|
# _mcversion="26.0.107" # Doubtful
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
[[ -v _mcversion ]] && \
|
# [[ -v _mcversion ]] && \
|
||||||
_version_source="compatibility lookup" && \
|
# _version_source="compatibility lookup" && \
|
||||||
debug "To override, use --mcversion" && \
|
# debug "To override, use --mcversion" && \
|
||||||
return 0
|
# return 0
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Use a containerized package manager
|
# Use a containerized package manager
|
||||||
# TODO but how to determine build distro ($_base=buster)?
|
# TODO but how to determine build distro ($_base=buster)?
|
||||||
|
|||||||
Reference in New Issue
Block a user