diff --git a/scripts/fluidd.sh b/scripts/fluidd.sh index c6f7ecd..71d5819 100644 --- a/scripts/fluidd.sh +++ b/scripts/fluidd.sh @@ -317,10 +317,16 @@ function get_fluidd_status() { } function get_local_fluidd_version() { - [[ ! -f "${FLUIDD_DIR}/.version" ]] && return - + local versionfile="${FLUIDD_DIR}/.version" + local relinfofile="${FLUIDD_DIR}/release_info.json" local version - version=$(head -n 1 "${FLUIDD_DIR}/.version") + + if [[ -f ${relinfofile} ]]; then + version=$(grep -o '"version":"[^"]*' "${relinfofile}" | grep -o '[^"]*$') + elif [[ -f ${versionfile} ]]; then + version=$(head -n 1 "${versionfile}") + fi + echo "${version}" } diff --git a/scripts/mainsail.sh b/scripts/mainsail.sh index 7b052d5..c8c1b50 100644 --- a/scripts/mainsail.sh +++ b/scripts/mainsail.sh @@ -324,10 +324,16 @@ function get_mainsail_status() { } function get_local_mainsail_version() { - [[ ! -f "${MAINSAIL_DIR}/.version" ]] && return - + local versionfile="${MAINSAIL_DIR}/.version" + local relinfofile="${MAINSAIL_DIR}/release_info.json" local version - version=$(head -n 1 "${MAINSAIL_DIR}/.version") + + if [[ -f ${relinfofile} ]]; then + version=$(grep -o '"version":"[^"]*' "${relinfofile}" | grep -o '[^"]*$') + elif [[ -f ${versionfile} ]]; then + version=$(head -n 1 "${versionfile}") + fi + echo "${version}" } @@ -547,7 +553,7 @@ function get_mainsail_download_url() { url=${unstable_url} fi fi - + echo "${url}" }