|
@@ -18,9 +18,9 @@
|
|
|
# * Be careful with tabs in heredocs
|
|
|
shopt -s extglob
|
|
|
|
|
|
-declare -g SCRIPT_VERSION="1.4.7"
|
|
|
+declare -g SCRIPT_VERSION="1.4.8"
|
|
|
declare -g MC_REPO="bullseye" # should match the MC_VERSION
|
|
|
-declare -g MC_VERSION="33.0.61" # Do find all replace
|
|
|
+declare -g MC_VERSION="33.0.71" # Do find all replace
|
|
|
declare -g BOARD_URL="https://yabb.jriver.com/interact/index.php/board,86.0.html" # MC33
|
|
|
declare -gi UPDATE_SWITCH=1 # set to 0 to disable automatic self-update
|
|
|
declare -g SCRIPT_URL="https://git.bryanroessler.com/bryan/installJRMC/raw/master/installJRMC"
|
|
@@ -115,9 +115,9 @@ print_help() {
|
|
|
# @arg $@ User input
|
|
|
parse_input() {
|
|
|
debug "Running: ${FUNCNAME[0]} $*"
|
|
|
- declare -gi BUILD_SWITCH=0 REPO_INSTALL_SWITCH=0 LOCAL_INSTALL_SWITCH=0 \
|
|
|
- CONTAINER_INSTALL_SWITCH=0 COMPAT_SWITCH=0 CREATEREPO_SWITCH=0 UNINSTALL_SWITCH=0 \
|
|
|
- YES_SWITCH=0 DEBUG=0
|
|
|
+ declare -gi BUILD_SWITCH REPO_INSTALL_SWITCH LOCAL_INSTALL_SWITCH \
|
|
|
+ CONTAINER_INSTALL_SWITCH CREATEREPO_SWITCH \
|
|
|
+ COMPAT_SWITCH UNINSTALL_SWITCH YES_SWITCH DEBUG=0
|
|
|
declare -g USER_MC_VERSION USER_MC_REPO MJR_FILE \
|
|
|
BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY BUILD_TARGET CREATEREPO_TARGET
|
|
|
local long_opts short_opts input
|
|
@@ -198,6 +198,14 @@ parse_input() {
|
|
|
err "Incorrect option provided, see installJRMC --help"; exit 1
|
|
|
fi
|
|
|
|
|
|
+ # Fallback to default install method in some scenarios
|
|
|
+ if ! ((UNINSTALL_SWITCH + BUILD_SWITCH + CREATEREPO_SWITCH +
|
|
|
+ LOCAL_INSTALL_SWITCH + CONTAINER_INSTALL_SWITCH)) &&
|
|
|
+ [[ ${#SERVICES[@]} -eq 0 && ${#CONTAINERS[@]} -eq 0 ]]; then
|
|
|
+ debug "Automatically using --install=repo"
|
|
|
+ REPO_INSTALL_SWITCH=1
|
|
|
+ fi
|
|
|
+
|
|
|
# Print some warnings for unsupported argument combinations
|
|
|
if [[ -n $USER_MC_REPO ]] && ((LOCAL_INSTALL_SWITCH)); then
|
|
|
err "--install=local is not compatible with --mcrepo as only the default ($MC_REPO) DEB is available"
|
|
@@ -240,13 +248,7 @@ init() {
|
|
|
USER="${SUDO_USER:-$USER}"
|
|
|
fi
|
|
|
|
|
|
- # Parse input commands with getopt
|
|
|
- if [[ $# -eq 0 || ! "$*" =~ (--install|--service|--container|--createrepo) ]]; then
|
|
|
- debug "Automatically using --install=repo"
|
|
|
- declare -gi REPO_INSTALL_SWITCH=1
|
|
|
- else
|
|
|
- parse_input "$@"
|
|
|
- fi
|
|
|
+ parse_input "$@"
|
|
|
|
|
|
# Run the self-updater if enabled
|
|
|
((UPDATE_SWITCH)) && update "$@"
|