Compare commits

...

3 Commits

Author SHA1 Message Date
o080o
c3ec482eb2 Merge 2cafa5848e into d33ac6b15a 2024-08-03 20:52:43 +02:00
dw-0
d33ac6b15a fix: parse moonraker dependencies from system-dependencies.json (#492)
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
2024-08-03 13:30:34 +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 8 additions and 4 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

@@ -142,12 +142,12 @@ function moonraker_setup_dialog() {
function install_moonraker_dependencies() {
local packages log_name="Moonraker"
local install_script="${MOONRAKER_DIR}/scripts/install-moonraker.sh"
local package_json="${MOONRAKER_DIR}/scripts/system-dependencies.json"
### read PKGLIST from official install-script
status_msg "Reading dependencies..."
# shellcheck disable=SC2016
packages="$(grep "PKGLIST=" "${install_script}" | cut -d'"' -f2 | sed 's/\${PKGLIST}//g' | tr -d '\n')"
packages=$(cat $package_json | tr -d ' \n{}' | cut -d "]" -f1 | cut -d":" -f2 | tr -d '"[' | sed 's/,/ /g')
echo "${cyan}${packages}${white}" | tr '[:space:]' '\n'
read -r -a packages <<< "${packages}"