Compare commits

...

3 Commits

Author SHA1 Message Date
o080o
6b6aa563cd Merge 2cafa5848e into 8547942986 2024-08-09 20:08:52 +02:00
Henrik Fransson
8547942986 readme: fix broken OctoApp plugin link (#494) 2024-08-06 16:41:18 +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
2 changed files with 7 additions and 3 deletions

View File

@@ -154,7 +154,7 @@ prompt and confirm by hitting ENTER.
<tr>
<th><h3><a href="https://github.com/Clon1998/mobileraker_companion">Mobileraker's Companion</a></h3></th>
<th><h3><a href="https://octoeverywhere.com/?source=kiauh_readme">OctoEverywhere For Klipper</a></h3></th>
<th><h3><a href="https://github.com/crysxd/OctoPrint-OctoApp">OctoApp For Klipper</a></h3></th>
<th><h3><a href="https://github.com/crysxd/OctoApp-Plugin">OctoApp For Klipper</a></h3></th>
<th><h3></h3></th>
</tr>

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"