Simpler tools-shared script to download shared tools
[#173008965](https://www.pivotaltracker.com/story/show/173008965)
-#!/bin/bash
-export GO111MODULE=on
-
-GIT_ROOT=${GIT_ROOT:-$(git rev-parse --show-toplevel)}
-
-cd $GIT_ROOT
-
-[ ! -d "$GIT_ROOT/tools" ] && mkdir -p "$GIT_ROOT/tools"
-
-# Gets the quarks-utils version from go.mod
-quarks_utils_version=$(grep code.cloudfoundry.org/quarks-utils go.mod | awk '{print $2}')
-quarks_utils_version=$(echo $quarks_utils_version | sed 's/.*-//g') # Keep only the commit
-
-# Clone quarks-utils if necessary and checkout the commit from go.mod
-if [ ! -d "$GIT_ROOT/tools/quarks-utils" ]; then
- git clone "https://github.com/cloudfoundry-incubator/quarks-utils" "$GIT_ROOT/tools/quarks-utils"
-fi
-
-pushd "$GIT_ROOT/tools/quarks-utils"
-
- # Create a branch with the checkout, so we can also test changes locally and clone
- # only if we didn't do that already
- branch=$(git rev-parse --abbrev-ref HEAD)
- if [[ "$branch" != "utils" ]]; then
- git checkout "$quarks_utils_version" -b utils
- else
- git fetch --all
- if [[ $(git --no-pager diff HEAD "$quarks_utils_version" --raw | wc -l) != "0" ]]; then
- echo "Changes detected, resetting branch"
- git reset --hard "$quarks_utils_version"
- fi
- fi
-
-popd
+#!/bin/sh
+curl -s "https://raw.githubusercontent.com/cloudfoundry-incubator/quarks-utils/master/bin/tools-shared-get-v1.sh" | sh
