mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-26 01:03:35 +05:00
Compare commits
3 Commits
80832c2d42
...
deeb12a664
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
deeb12a664 | ||
|
|
7993b98ee1 | ||
|
|
2cafa5848e |
@@ -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"
|
||||
|
||||
|
||||
@@ -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}"
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user