From 78668b56e497514a9107d960a32a2623d84b5f8f Mon Sep 17 00:00:00 2001 From: hg42 Date: Mon, 6 May 2024 20:12:52 +0200 Subject: [PATCH 1/2] do not mess with klipper url, allow access via ssh or sites like gitlab --- scripts/klipper.sh | 5 +++-- scripts/switch_klipper_repo.sh | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/klipper.sh b/scripts/klipper.sh index 117caef..524f929 100644 --- a/scripts/klipper.sh +++ b/scripts/klipper.sh @@ -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" diff --git a/scripts/switch_klipper_repo.sh b/scripts/switch_klipper_repo.sh index 7f224c2..1e1bbe4 100644 --- a/scripts/switch_klipper_repo.sh +++ b/scripts/switch_klipper_repo.sh @@ -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" -- 2.39.5 From a374ac8facaa4c22b4b8892b97e86638cc818770 Mon Sep 17 00:00:00 2001 From: Justin Otherguy Date: Thu, 9 May 2024 20:56:16 +0200 Subject: [PATCH 2/2] fix: add unzip to dependencies for Mainsail and Fluidd --- scripts/fluidd.sh | 2 +- scripts/mainsail.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fluidd.sh b/scripts/fluidd.sh index accbcb1..35620be 100644 --- a/scripts/fluidd.sh +++ b/scripts/fluidd.sh @@ -37,7 +37,7 @@ function install_fluidd() { fi ### checking dependencies - local dep=(wget nginx) + local dep=(wget nginx unzip) dependency_check "${dep[@]}" ### detect conflicting Haproxy and Apache2 installations detect_conflicting_packages diff --git a/scripts/mainsail.sh b/scripts/mainsail.sh index 9182c6c..73ea7a5 100644 --- a/scripts/mainsail.sh +++ b/scripts/mainsail.sh @@ -37,7 +37,7 @@ function install_mainsail() { fi ### checking dependencies - local dep=(wget nginx) + local dep=(wget nginx unzip) dependency_check "${dep[@]}" ### detect conflicting Haproxy and Apache2 installations detect_conflicting_packages -- 2.39.5