Compare commits

...

3 Commits

Author SHA1 Message Date
o080o
deeb12a664 Merge 2cafa5848e into 7993b98ee1 2024-06-26 07:04:20 +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
o080o
2cafa5848e allow non-github klipper repositories, as well as ssh cloning for github+gitlab 2024-03-18 21:58:12 -05:00
3 changed files with 13 additions and 5 deletions

View File

@@ -253,8 +253,12 @@ function clone_klipper() {
local repo=${1} branch=${2}
[[ -z ${repo} ]] && repo="${KLIPPER_REPO}"
repo=$(echo "${repo}" | sed -r "s/^(http|https):\/\/github\.com\///i; s/\.git$//")
repo="https://github.com/${repo}"
if [[ "${repo}" =~ ^(http|https):\/\/github.com || ! "$repo" =~ ^(http|https):\/\/ && ! "$repo" =~ ^git@ ]]; then
repo=$(echo "${repo}" | sed -r "s/^(http|https):\/\/github\.com\///i; s/\.git$//")
repo="https://github.com/${repo}"
else
repo=${repo}
fi
[[ -z ${branch} ]] && branch="master"

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