summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-17 16:48:15 -0600
committermo khan <mo.khan@gmail.com>2020-04-17 16:48:15 -0600
commitadb158d1df5bb691793074b10e9b857d45ff59eb (patch)
treecada56e243f974f3c1ca1faa76ffe7ee4d50e82e
parent1eec12743b42e987801e335b11884158480d6640 (diff)
Skip tool install unless required
-rwxr-xr-xrun.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/run.sh b/run.sh
index fc843bd..fe83f89 100755
--- a/run.sh
+++ b/run.sh
@@ -67,10 +67,18 @@ function prepare_dotnet() {
[[ $(ls ./*.sln 2> /dev/null) ]] && RECURSIVE="--recursive"
}
+function prepare_tools() {
+ if asdf current 2> >(grep -q 'is not installed'); then
+ echo "No tools to install"
+ else
+ echo "Installing missing tools"
+ asdf install 2>&1
+ fi
+}
+
function prepare_project() {
if [[ -z ${SETUP_CMD:-} ]]; then
- asdf install > /dev/null 2>&1
-
+ prepare_tools || true
prepare_javascript || true
prepare_dotnet || true
else