Prevent overriding switches for unknown OS

This commit is contained in:
2023-03-19 11:35:09 -04:00
parent a5b37bc1be
commit cff3b99a7d

View File

@@ -141,7 +141,9 @@ parseInput() {
declare -g TARGET=${TARGET:-$ID} declare -g TARGET=${TARGET:-$ID}
declare -g CREATEREPO_USER="${CREATEREPO_USER:-$USER}" declare -g CREATEREPO_USER="${CREATEREPO_USER:-$USER}"
if [[ $# -eq 0 ]] || [[ $# -eq 1 && " $1 " =~ ^( --debug | -d )$ ]]; then if [[ $# -eq 0 ]] ||
[[ $# -eq 1 && " $1 " =~ ^( --debug | -d )$ ]] &&
[[ $ID != "unknown" ]]; then
REPO_INSTALL_SWITCH=1 REPO_INSTALL_SWITCH=1
elif [[ $# -eq 1 && " $1 " =~ ^( --compat )$ ]]; then elif [[ $# -eq 1 && " $1 " =~ ^( --compat )$ ]]; then
BUILD_SWITCH=1 BUILD_SWITCH=1
@@ -331,9 +333,9 @@ init() {
err "OS detection failed!" err "OS detection failed!"
askOk "Continue with manual installation?" || exit 1 askOk "Continue with manual installation?" || exit 1
ID="unknown" ID="unknown"
declare -g REPO_INSTALL_SWITCH=0 REPO_INSTALL_SWITCH=0
declare -g BUILD_SWITCH=1 BUILD_SWITCH=1
declare -g LOCAL_INSTALL_SWITCH=1 LOCAL_INSTALL_SWITCH=1
fi fi
esac esac
@@ -1712,8 +1714,6 @@ main() {
;; ;;
esac esac
debug "REPO_INSTALL_SWITCH=$REPO_INSTALL_SWITCH"
if (( REPO_INSTALL_SWITCH )); then if (( REPO_INSTALL_SWITCH )); then
echo "Installing JRiver Media Center from remote repository" echo "Installing JRiver Media Center from remote repository"
if installMCFromRepo; then if installMCFromRepo; then