Compare commits

...

3 Commits

Author SHA1 Message Date
Nick Berardi
e9aa224c17 Merge 89a9d38d39 into a929c6983d 2024-06-29 07:57:05 +02:00
Beans Baxter
a929c6983d refactor: don't check spoolman version if not installed (#487) 2024-06-28 23:07:20 +02:00
Nick Berardi
89a9d38d39 trim klipper git clone to only latest history 2024-01-01 15:03:40 -05:00
2 changed files with 6 additions and 6 deletions

View File

@@ -264,7 +264,7 @@ function clone_klipper() {
status_msg "Cloning Klipper from ${repo} ..."
cd "${HOME}" || exit 1
if git clone "${repo}" "${KLIPPER_DIR}"; then
if git clone "${repo}" "${KLIPPER_DIR}" --depth 1; then
cd "${KLIPPER_DIR}" && git checkout "${branch}"
else
print_error "Cloning Klipper from\n ${repo}\n failed!"

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