mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-06 04:34:19 +01:00
Merge pull request #381 from hackacad/open_templates
allow alternative template servers
This commit is contained in:
@@ -426,7 +426,7 @@ current-build-latest|current-BUILD-LATEST|CURRENT-BUILD-LATEST)
|
|||||||
PLATFORM_OS="HardenedBSD"
|
PLATFORM_OS="HardenedBSD"
|
||||||
validate_release_url
|
validate_release_url
|
||||||
;;
|
;;
|
||||||
http?://github.com/*/*|http?://gitlab.com/*/*)
|
http?://*/*/*)
|
||||||
BASTILLE_TEMPLATE_URL=${1}
|
BASTILLE_TEMPLATE_URL=${1}
|
||||||
BASTILLE_TEMPLATE_USER=$(echo "${1}" | awk -F / '{ print $4 }')
|
BASTILLE_TEMPLATE_USER=$(echo "${1}" | awk -F / '{ print $4 }')
|
||||||
BASTILLE_TEMPLATE_REPO=$(echo "${1}" | awk -F / '{ print $5 }')
|
BASTILLE_TEMPLATE_REPO=$(echo "${1}" | awk -F / '{ print $5 }')
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ if [ "${TARGET}" = '--convert' ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case ${TEMPLATE} in
|
case ${TEMPLATE} in
|
||||||
http?://github.com/*/*|http?://gitlab.com/*/*)
|
http?://*/*/*)
|
||||||
TEMPLATE_DIR=$(echo "${TEMPLATE}" | awk -F / '{ print $4 "/" $5 }')
|
TEMPLATE_DIR=$(echo "${TEMPLATE}" | awk -F / '{ print $4 "/" $5 }')
|
||||||
if [ ! -d "${bastille_templatesdir}/${TEMPLATE_DIR}" ]; then
|
if [ ! -d "${bastille_templatesdir}/${TEMPLATE_DIR}" ]; then
|
||||||
info "Bootstrapping ${TEMPLATE}..."
|
info "Bootstrapping ${TEMPLATE}..."
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ verify_template() {
|
|||||||
info "[${_hook}]:[${_include}]:"
|
info "[${_hook}]:[${_include}]:"
|
||||||
|
|
||||||
case ${_include} in
|
case ${_include} in
|
||||||
http?://github.com/*/*|http?://gitlab.com/*/*)
|
http?://*/*/*)
|
||||||
bastille bootstrap "${_include}"
|
bastille bootstrap "${_include}"
|
||||||
;;
|
;;
|
||||||
*/*)
|
*/*)
|
||||||
|
|||||||
Reference in New Issue
Block a user