Compare commits

...

3 Commits

2 changed files with 6 additions and 5 deletions

View File

@@ -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}")

View File

@@ -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}"