From c274ddc4e199e4cdb8ebe69f06a8ccb66c60ef04 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Thu, 3 Jun 2021 21:55:03 +0200 Subject: [PATCH] Handle SSH connections and assume folder exists --- plugin.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin.sh b/plugin.sh index fa59f04..f39e032 100755 --- a/plugin.sh +++ b/plugin.sh @@ -31,8 +31,11 @@ run_abra_cmd() { echo "Detected release command, attempting to detect recipe now..." recipe=$(echo "$PLUGIN_COMMAND" | cut -d' ' -f2) echo "Automagically detected $recipe as desired recipe repository, cloning now..." - mkdir -p /root/.abra/apps + git clone "https://git.autonomic.zone/coop-cloud/$recipe.git" "/root/.abra/apps/$recipe" + cd "/root/.abra/apps/$recipe" && \ + git remote rm origin && \ + git remote add origin "ssh://git@git.autonomic.zone:2222/coop-cloud/$recipe.git" fi # shellcheck disable=SC2086