From a6e8f4b8986fe74f47ea723b1b63941e0dd6af88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 8 Jun 2018 11:46:36 +0200 Subject: [PATCH] Rename functions not telling the truth in bootstrap script --- hack/bootstrap_tfw_dev.sh | 22 +++++++++++----------- hack/oneline_install.sh | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hack/bootstrap_tfw_dev.sh b/hack/bootstrap_tfw_dev.sh index 952fd59..826820c 100755 --- a/hack/bootstrap_tfw_dev.sh +++ b/hack/bootstrap_tfw_dev.sh @@ -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" diff --git a/hack/oneline_install.sh b/hack/oneline_install.sh index a8963e9..dc1b5e3 100644 --- a/hack/oneline_install.sh +++ b/hack/oneline_install.sh @@ -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!'