|
@@ -22,8 +22,7 @@ declare -g OUTPUTDIR="$PWD/output"
|
|
# MC30 (Buster)
|
|
# MC30 (Buster)
|
|
declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,76.0.html"
|
|
declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,76.0.html"
|
|
declare -g DEBIANBASE="buster"
|
|
declare -g DEBIANBASE="buster"
|
|
-declare -g MCVERSION_HARDCODE="30.0.51" # Hardcoded fallback
|
|
|
|
-
|
|
|
|
|
|
+declare -g MCVERSION_HARDCODE="${MCVERSION:-"30.0.55"}" # Hardcoded fallback
|
|
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
|
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
|
declare -g USER="${SUDO_USER:-$USER}"
|
|
declare -g USER="${SUDO_USER:-$USER}"
|
|
declare -g HOME; HOME=$(getent passwd "$USER" | cut -d: -f6)
|
|
declare -g HOME; HOME=$(getent passwd "$USER" | cut -d: -f6)
|
|
@@ -51,7 +50,7 @@ printHelp() {
|
|
--outputdir PATH
|
|
--outputdir PATH
|
|
Generate rpmbuild output in this directory (default: ./output)
|
|
Generate rpmbuild output in this directory (default: ./output)
|
|
--restorefile RESTOREFILE
|
|
--restorefile RESTOREFILE
|
|
- Restore file location for automatic license registration (default: skip registration)
|
|
|
|
|
|
+ Restore file location for automatic license registration
|
|
--betapass PASSWORD
|
|
--betapass PASSWORD
|
|
Enter beta team password for access to beta builds
|
|
Enter beta team password for access to beta builds
|
|
--service, -s SERVICE
|
|
--service, -s SERVICE
|
|
@@ -124,7 +123,7 @@ execute() {
|
|
parseInput() {
|
|
parseInput() {
|
|
debug "Running: ${FUNCNAME[0]}"
|
|
debug "Running: ${FUNCNAME[0]}"
|
|
|
|
|
|
- declare -g BUILD_SWITCH REPO_INSTALL_SWITCH COMPAT_SWITCH TEST_SWITCH
|
|
|
|
|
|
+ declare -g BUILD_SWITCH REPO_INSTALL_SWITCH COMPAT_SWITCH TEST_SWITCH USER_VERSION_SWITCH
|
|
declare -g LOCAL_INSTALL_SWITCH CREATEREPO_SWITCH UNINSTALL_SWITCH
|
|
declare -g LOCAL_INSTALL_SWITCH CREATEREPO_SWITCH UNINSTALL_SWITCH
|
|
declare -g OUTPUTDIR RESTOREFILE BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY CREATEREPO_WEBROOT
|
|
declare -g OUTPUTDIR RESTOREFILE BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY CREATEREPO_WEBROOT
|
|
declare -ga SERVICES CONTAINERS
|
|
declare -ga SERVICES CONTAINERS
|
|
@@ -170,7 +169,9 @@ parseInput() {
|
|
shift && OUTPUTDIR="$1"
|
|
shift && OUTPUTDIR="$1"
|
|
;;
|
|
;;
|
|
--mcversion)
|
|
--mcversion)
|
|
- shift && declare -g MCVERSION_INPUT="$1"
|
|
|
|
|
|
+ shift
|
|
|
|
+ MCVERSION="$1"
|
|
|
|
+ USER_VERSION_SWITCH=1
|
|
;;
|
|
;;
|
|
--restorefile)
|
|
--restorefile)
|
|
shift && RESTOREFILE="$1"
|
|
shift && RESTOREFILE="$1"
|
|
@@ -347,16 +348,12 @@ init() {
|
|
setMCVersion() {
|
|
setMCVersion() {
|
|
debug "Running: ${FUNCNAME[0]}"
|
|
debug "Running: ${FUNCNAME[0]}"
|
|
|
|
|
|
- declare -g MCVERSION MCVERSION_SOURCE MVERSION MCPKG MCRPM
|
|
|
|
|
|
+ declare -g MCVERSION_SOURCE MVERSION MCPKG MCRPM
|
|
declare cnt
|
|
declare cnt
|
|
|
|
|
|
# User input
|
|
# User input
|
|
- if [[ -v MCVERSION_INPUT ]]; then
|
|
|
|
- if ! [[ "$MCVERSION_INPUT" =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
|
|
|
- err "Incorrect --mcversion format provided"
|
|
|
|
- printHelp && exit 1
|
|
|
|
- fi
|
|
|
|
- MCVERSION="$MCVERSION_INPUT"
|
|
|
|
|
|
+ if (( USER_VERSION_SWITCH )) &&
|
|
|
|
+ [[ "$MCVERSION" =~ ([0-9]+.[0-9]+.[0-9]+) ]]; then
|
|
MCVERSION_SOURCE="user input"
|
|
MCVERSION_SOURCE="user input"
|
|
# Containerized package manager
|
|
# Containerized package manager
|
|
elif installPackage --silent buildah &&
|
|
elif installPackage --silent buildah &&
|
|
@@ -375,8 +372,8 @@ setMCVersion() {
|
|
MCVERSION_SOURCE="webscrape"
|
|
MCVERSION_SOURCE="webscrape"
|
|
# Hardcoded
|
|
# Hardcoded
|
|
else
|
|
else
|
|
- MCVERSION="$MCVERSION_HARDCODE"
|
|
|
|
- MCVERSION_SOURCE="hardcoded version"
|
|
|
|
|
|
+ declare -g MCVERSION="$MCVERSION_HARDCODE"
|
|
|
|
+ MCVERSION_SOURCE="hardcoded or MCVERSION env"
|
|
err "Warning! Using hardcoded version number"
|
|
err "Warning! Using hardcoded version number"
|
|
fi
|
|
fi
|
|
|
|
|