do not mess with klipper url, allow access via ssh or sites like gitlab, alternate to #452 #465
@@ -253,8 +253,9 @@ 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 != *://* ]]; then
|
||||
repo="https://github.com/${repo}"
|
||||
fi
|
||||
|
||||
[[ -z ${branch} ]] && branch="master"
|
||||
|
||||
|
||||
@@ -22,7 +22,9 @@ function change_klipper_repo_menu() {
|
||||
|
||||
### generate the repolist from the klipper_repos.txt textfile
|
||||
while IFS="," read -r repo branch; do
|
||||
repo=$(echo "${repo}" | sed -r "s/^http(s)?:\/\/github.com\///" | sed "s/\.git$//" )
|
||||
if [[ $repo != *://* ]]; then
|
||||
repo="https://github.com/${repo}"
|
||||
fi
|
||||
repos+=("${repo}")
|
||||
### if branch is not given, default to 'master'
|
||||
[[ -z ${branch} ]] && branch="master"
|
||||
|
||||
Reference in New Issue
Block a user