Update bootstrap.sh
https://github.com/BastilleBSD/bastille/pull/390#discussion_r650394708 https://github.com/BastilleBSD/bastille/pull/390#discussion_r650396080 https://github.com/BastilleBSD/bastille/pull/390#discussion_r650396339
This commit is contained in:
@@ -50,9 +50,7 @@ if [ "$(sysrc -n zfs_enable)" = "YES" ] && [ ! "${bastille_zfs_enable}" = "YES"
|
|||||||
no|No|n|N|"")
|
no|No|n|N|"")
|
||||||
error_exit "ERROR: Missing ZFS parameters. See bastille_zfs_enable."
|
error_exit "ERROR: Missing ZFS parameters. See bastille_zfs_enable."
|
||||||
;;
|
;;
|
||||||
yes|Yes|y|Y)
|
yes|Yes|y|Y) ;;
|
||||||
# continue
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -266,8 +264,7 @@ bootstrap_release() {
|
|||||||
|
|
||||||
## fetch for missing dist files
|
## fetch for missing dist files
|
||||||
if [ ! -f "${bastille_cachedir}/${RELEASE}/${_archive}.txz" ]; then
|
if [ ! -f "${bastille_cachedir}/${RELEASE}/${_archive}.txz" ]; then
|
||||||
if ! fetch "${UPSTREAM_URL}/${_archive}.txz" -o "${bastille_cachedir}/${RELEASE}/${_archive}.txz";
|
if ! fetch "${UPSTREAM_URL}/${_archive}.txz" -o "${bastille_cachedir}/${RELEASE}/${_archive}.txz"; then
|
||||||
then
|
|
||||||
## alert only if unable to fetch additional dist files
|
## alert only if unable to fetch additional dist files
|
||||||
error_notify "Failed to fetch ${_archive}.txz."
|
error_notify "Failed to fetch ${_archive}.txz."
|
||||||
fi
|
fi
|
||||||
@@ -328,15 +325,15 @@ bootstrap_template() {
|
|||||||
_template=${bastille_templatesdir}/${_user}/${_repo}
|
_template=${bastille_templatesdir}/${_user}/${_repo}
|
||||||
|
|
||||||
## support for non-git
|
## support for non-git
|
||||||
if [ ! -x "$(which git)" ]; then
|
if ! which -s git; then
|
||||||
error_notify "Git not found."
|
error_notify "Git not found."
|
||||||
error_exit "Not yet implemented."
|
error_exit "Not yet implemented."
|
||||||
elif [ -x "$(which git)" ]; then
|
else
|
||||||
if [ ! -d "${_template}/.git" ]; then
|
if [ ! -d "${_template}/.git" ]; then
|
||||||
$(which git) clone "${_url}" "${_template}" ||\
|
git clone "${_url}" "${_template}" ||\
|
||||||
error_notify "Clone unsuccessful."
|
error_notify "Clone unsuccessful."
|
||||||
elif [ -d "${_template}/.git" ]; then
|
elif [ -d "${_template}/.git" ]; then
|
||||||
(cd "${_template}" && $(which git) pull) ||\
|
git -C "${_template}" pull ||\
|
||||||
error_notify "Template update unsuccessful."
|
error_notify "Template update unsuccessful."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user