From 9a00ae532304439bbc5930110519999f13a2c8a8 Mon Sep 17 00:00:00 2001 From: Nico Wiseman Date: Mon, 16 Jan 2023 16:40:21 +0000 Subject: [PATCH 1/2] Added git endpoint for bastille bootstrap --- usr/local/share/bastille/bootstrap.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr/local/share/bastille/bootstrap.sh b/usr/local/share/bastille/bootstrap.sh index b106e28..660d69d 100644 --- a/usr/local/share/bastille/bootstrap.sh +++ b/usr/local/share/bastille/bootstrap.sh @@ -543,6 +543,13 @@ http?://*/*/*) BASTILLE_TEMPLATE_REPO=$(echo "${1}" | awk -F / '{ print $5 }') bootstrap_template ;; +git@*:*/*) + BASTILLE_TEMPLATE_URL=${1} + git_repository=$(echo "${1}" | awk -F : '{ print $2 }') + BASTILLE_TEMPLATE_USER=$(echo "${git_repository}" | awk -F / '{ print $1 }') + BASTILLE_TEMPLATE_REPO=$(echo "${git_repository}" | awk -F / '{ print $2 }') + bootstrap_template + ;; #adding Ubuntu Bionic as valid "RELEASE" for POC @hackacad ubuntu_bionic|bionic|ubuntu-bionic) PLATFORM_OS="Ubuntu/Linux" From 5adc75abed349ba8de152ae605e3131d49bde7af Mon Sep 17 00:00:00 2001 From: Nico Wiseman Date: Mon, 16 Jan 2023 17:12:03 +0000 Subject: [PATCH 2/2] Clean up the git template name by removing .git from the end - this looks weird in the filesystem --- usr/local/share/bastille/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/bootstrap.sh b/usr/local/share/bastille/bootstrap.sh index 660d69d..c6acdbb 100644 --- a/usr/local/share/bastille/bootstrap.sh +++ b/usr/local/share/bastille/bootstrap.sh @@ -425,7 +425,7 @@ bootstrap_template() { ## define basic variables _url=${BASTILLE_TEMPLATE_URL} _user=${BASTILLE_TEMPLATE_USER} - _repo=${BASTILLE_TEMPLATE_REPO} + _repo=${BASTILLE_TEMPLATE_REPO%.*} # Remove the trailing ".git" _template=${bastille_templatesdir}/${_user}/${_repo} ## support for non-git