Compare commits

...

3 Commits

Author SHA1 Message Date
Ruben P
a75004a94b Merge d190a60ff7 into 7993b98ee1 2024-06-26 19:36:58 +02:00
Alessandro Maggi
7993b98ee1 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
2024-06-26 07:04:09 +02:00
Ruben P
d190a60ff7 add an option to terminate or not subprocess
default is true (same behavior as now)
2022-08-29 23:17:51 +02:00
3 changed files with 9 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ class ShellCommand:
self.command = shlex.split(cmd)
self.timeout = config.getfloat('timeout', 2., above=0.)
self.verbose = config.getboolean('verbose', True)
self.terminate = config.getboolean('terminate', True)
self.proc_fd = None
self.partial_output = ""
self.gcode.register_mux_command(
@@ -68,7 +69,7 @@ class ShellCommand:
if proc.poll() is not None:
complete = True
break
if not complete:
if not complete and self.terminate:
proc.terminate()
if self.verbose:
if self.partial_output:

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