1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 02:57:18 +00:00

Rename functions not telling the truth in bootstrap script

This commit is contained in:
Kristóf Tóth 2018-06-08 11:46:36 +02:00
parent 81a930470a
commit a6e8f4b898
2 changed files with 12 additions and 12 deletions

View File

@ -29,12 +29,12 @@ run()
: > $LOGFILE
check_dependencies
clone_repos_ask_ssh_or_https
clone_required_repos_ask_ssh_or_https
TAG="${BASEIMAGE_ONLY:-$(fetch_latest_tag)}"
TAG=$TAG build_latest_baseimage
TAG=$TAG build_baseimage
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
TAG=$TAG pin_latest_baseimage
TAG=$TAG pin_baseimage
install_frontend_deps
if [ "$TFWDEV" == "0" ]; then
cleanup_repos
@ -44,8 +44,8 @@ run()
delete_repos
fi
echo
if [ -z "${BASEIMAGE_ONLY:-}" ]; then
echo
echo "You can build & start TFW by executing the command: ${TEST}/hack/tfw.sh start"
else
echo "Baseimage version ${BASEIMAGE_ONLY} built successfully!"
@ -88,22 +88,22 @@ check_dependencies()
fi
}
clone_repos_ask_ssh_or_https()
clone_required_repos_ask_ssh_or_https()
{
if [[ -z "$HTTPS_REMOTES" ]]; then
read -p "Repos are pulled over SSH by default. Should I use HTTPS instead? [y/N]" -r -t 5 || :
echo
if [[ $REPLY =~ ^(y|Y|yes|Yes|YES)$ ]]; then
HTTPS_REMOTES=1 clone_repos
HTTPS_REMOTES=1 clone_required_repos
else
HTTPS_REMOTES=0 clone_repos
HTTPS_REMOTES=0 clone_required_repos
fi
else
clone_repos
clone_required_repos
fi
}
clone_repos()
clone_required_repos()
{
[[ "$HTTPS_REMOTES" == "1" ]] && remotebase="https://github.com/"
@ -134,7 +134,7 @@ fetch_latest_tag()
tail -n 1)"
}
pin_latest_baseimage()
pin_baseimage()
{
echo -n "Pinning TFW baseimage version... "
echo -n "which is ${TAG}... "
@ -142,7 +142,7 @@ pin_latest_baseimage()
echo "Done!"
}
build_latest_baseimage()
build_baseimage()
{
echo -n "Building baseimage at ${TAG}... "
pushd "$BASEIMAGE"

View File

@ -1 +1 @@
URL=https://git.io/vxBfj SHA=237d0cce945574208784a21fa6c6fbb4f479e5ce60b1518b1fcc921d675d2861 bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!'
URL=https://git.io/vxBfj SHA=d81057610588e16666251a4167f05841fc8b66ccd6988490c1a2d2deb6de8ffa bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!'