fix: replace jq by grep to check Spoolman update (#482)

* fix: remove extra space in remove menu

* fix(spoolman): replace jq with grep
jq isn't included in some minimal installations
This commit is contained in:
Alessandro Maggi
2024-06-26 07:04:09 +02:00
committed by GitHub
parent 62296e112e
commit 7993b98ee1
2 changed files with 7 additions and 3 deletions

View File

@@ -248,13 +248,17 @@ function get_spoolman_status() {
function get_local_spoolman_version() {
local version
version=$(jq -r '.version' "${SPOOLMAN_DIR}"/release_info.json)
if [[ -d "${SPOOLMAN_DIR}" ]]; then
version=$(grep -o '"version":\s*"[^"]*' "${SPOOLMAN_DIR}"/release_info.json | cut -d'"' -f4)
else
version=""
fi
echo "${version}"
}
function get_remote_spoolman_version() {
local version
version=$(curl -s "${SPOOLMAN_REPO}" | jq -r '.tag_name')
version=$(curl -s "${SPOOLMAN_REPO}" | grep -o '"tag_name":\s*"v[^"]*"' | cut -d'"' -f4)
echo "${version}"
}

View File

@@ -29,7 +29,7 @@ function remove_ui() {
echo -e "| | 15) [Mobileraker] |"
echo -e "| Touchscreen GUI: | 16) [NGINX] |"
echo -e "| 7) [KlipperScreen] | 17) [OctoApp] |"
echo -e "| | 18) [Spoolman] |"
echo -e "| | 18) [Spoolman] |"
echo -e "| 3rd Party Webinterface: | |"
echo -e "| 8) [OctoPrint] | |"
back_footer