mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 16:23:36 +05:00
Compare commits
3 Commits
1cb920ec9a
...
ae3484e784
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae3484e784 | ||
|
|
a929c6983d | ||
|
|
6a766f7882 |
@@ -358,6 +358,7 @@ function get_usb_id() {
|
||||
unset mcu_list
|
||||
sleep 1
|
||||
mcus=$(find /dev/serial/by-id/* 2>/dev/null)
|
||||
mcus+=" $(find /dev/serial/by-path/* 2>/dev/null)"
|
||||
|
||||
for mcu in ${mcus}; do
|
||||
mcu_list+=("${mcu}")
|
||||
|
||||
@@ -247,16 +247,16 @@ function get_spoolman_status() {
|
||||
}
|
||||
|
||||
function get_local_spoolman_version() {
|
||||
[[ ! -d "${SPOOLMAN_DIR}" ]] && return
|
||||
|
||||
local version
|
||||
if [[ -d "${SPOOLMAN_DIR}" ]]; then
|
||||
version=$(grep -o '"version":\s*"[^"]*' "${SPOOLMAN_DIR}"/release_info.json | cut -d'"' -f4)
|
||||
else
|
||||
version=""
|
||||
fi
|
||||
version=$(grep -o '"version":\s*"[^"]*' "${SPOOLMAN_DIR}"/release_info.json | cut -d'"' -f4)
|
||||
echo "${version}"
|
||||
}
|
||||
|
||||
function get_remote_spoolman_version() {
|
||||
[[ ! -d "${SPOOLMAN_DIR}" ]] && return
|
||||
|
||||
local version
|
||||
version=$(curl -s "${SPOOLMAN_REPO}" | grep -o '"tag_name":\s*"v[^"]*"' | cut -d'"' -f4)
|
||||
echo "${version}"
|
||||
|
||||
Reference in New Issue
Block a user