mirror of
https://github.com/dw-0/kiauh.git
synced 2026-01-01 12:13:38 +05:00
Compare commits
3 Commits
55b6b611a6
...
31c78a4aaa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31c78a4aaa | ||
|
|
a929c6983d | ||
|
|
d190a60ff7 |
@@ -18,6 +18,7 @@ class ShellCommand:
|
|||||||
self.command = shlex.split(cmd)
|
self.command = shlex.split(cmd)
|
||||||
self.timeout = config.getfloat('timeout', 2., above=0.)
|
self.timeout = config.getfloat('timeout', 2., above=0.)
|
||||||
self.verbose = config.getboolean('verbose', True)
|
self.verbose = config.getboolean('verbose', True)
|
||||||
|
self.terminate = config.getboolean('terminate', True)
|
||||||
self.proc_fd = None
|
self.proc_fd = None
|
||||||
self.partial_output = ""
|
self.partial_output = ""
|
||||||
self.gcode.register_mux_command(
|
self.gcode.register_mux_command(
|
||||||
@@ -68,7 +69,7 @@ class ShellCommand:
|
|||||||
if proc.poll() is not None:
|
if proc.poll() is not None:
|
||||||
complete = True
|
complete = True
|
||||||
break
|
break
|
||||||
if not complete:
|
if not complete and self.terminate:
|
||||||
proc.terminate()
|
proc.terminate()
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
if self.partial_output:
|
if self.partial_output:
|
||||||
|
|||||||
@@ -247,16 +247,16 @@ function get_spoolman_status() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_local_spoolman_version() {
|
function get_local_spoolman_version() {
|
||||||
|
[[ ! -d "${SPOOLMAN_DIR}" ]] && return
|
||||||
|
|
||||||
local version
|
local version
|
||||||
if [[ -d "${SPOOLMAN_DIR}" ]]; then
|
version=$(grep -o '"version":\s*"[^"]*' "${SPOOLMAN_DIR}"/release_info.json | cut -d'"' -f4)
|
||||||
version=$(grep -o '"version":\s*"[^"]*' "${SPOOLMAN_DIR}"/release_info.json | cut -d'"' -f4)
|
|
||||||
else
|
|
||||||
version=""
|
|
||||||
fi
|
|
||||||
echo "${version}"
|
echo "${version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_remote_spoolman_version() {
|
function get_remote_spoolman_version() {
|
||||||
|
[[ ! -d "${SPOOLMAN_DIR}" ]] && return
|
||||||
|
|
||||||
local version
|
local version
|
||||||
version=$(curl -s "${SPOOLMAN_REPO}" | grep -o '"tag_name":\s*"v[^"]*"' | cut -d'"' -f4)
|
version=$(curl -s "${SPOOLMAN_REPO}" | grep -o '"tag_name":\s*"v[^"]*"' | cut -d'"' -f4)
|
||||||
echo "${version}"
|
echo "${version}"
|
||||||
|
|||||||
Reference in New Issue
Block a user