fix: nexus integration does not quit prematurely
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERSION="0.5.4"
|
VERSION="0.5.5"
|
||||||
|
|
||||||
# --- Globals ---
|
# --- Globals ---
|
||||||
|
|
||||||
@@ -1744,6 +1744,8 @@ function nexus_get_mod_info() {
|
|||||||
mod_name=$(echo "$response" | grep -oP '"name":"\K[^"]+')
|
mod_name=$(echo "$response" | grep -oP '"name":"\K[^"]+')
|
||||||
nexus_mod_version=$(echo "$response" | grep -oP '"version":"\K[^"]+')
|
nexus_mod_version=$(echo "$response" | grep -oP '"version":"\K[^"]+')
|
||||||
[[ -z "$mod_name" || -z "$nexus_mod_version" ]] && { log ERROR "Could not extract mod name and version (inside Nexus info check)."; return 1; }
|
[[ -z "$mod_name" || -z "$nexus_mod_version" ]] && { log ERROR "Could not extract mod name and version (inside Nexus info check)."; return 1; }
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function nexus_check_for_updates() {
|
function nexus_check_for_updates() {
|
||||||
@@ -1862,7 +1864,7 @@ function nexus() {
|
|||||||
new_mod_index=$(get_index_by_entry_from_db "$(awk -F, 'END {print $1}' "$DB_FILE")")
|
new_mod_index=$(get_index_by_entry_from_db "$(awk -F, 'END {print $1}' "$DB_FILE")")
|
||||||
[[ -z "$new_mod_index" ]] && { log ERROR "Could not get current mod index."; exit 1; }
|
[[ -z "$new_mod_index" ]] && { log ERROR "Could not get current mod index."; exit 1; }
|
||||||
|
|
||||||
[[ $mod_index -ne $old_mod_index ]] && mod_order -i "$new_mod_index" "$mod_index"
|
[[ $mod_index -ne $new_mod_index ]] && mod_order -i "$new_mod_index" "$mod_index"
|
||||||
|
|
||||||
log INFO "Mod ${GREEN}successfully${NC} updated: $mod_name."
|
log INFO "Mod ${GREEN}successfully${NC} updated: $mod_name."
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ if [[ -x "$(command -v $SCRIPT_NAME)" ]]; then
|
|||||||
log ERROR "Installed version is not in the correct format."
|
log ERROR "Installed version is not in the correct format."
|
||||||
log ERROR "h2mm is installed here -> $(which h2mm)"
|
log ERROR "h2mm is installed here -> $(which h2mm)"
|
||||||
log ERROR "Delete the script file and retry the install script, any mods installed will not be lost."
|
log ERROR "Delete the script file and retry the install script, any mods installed will not be lost."
|
||||||
|
log INFO 'Download using the command: bash -c "$(curl -fsSL https://raw.githubusercontent.com/v4n00/h2mm-cli/refs/heads/master/install.sh)"'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user