diff --git a/.chezmoiscripts/run_before_20_install_dev_lang.sh.tmpl b/.chezmoiscripts/run_before_20_install_dev_lang.sh.tmpl index 379a251..57bc3bd 100644 --- a/.chezmoiscripts/run_before_20_install_dev_lang.sh.tmpl +++ b/.chezmoiscripts/run_before_20_install_dev_lang.sh.tmpl @@ -16,6 +16,10 @@ if [ ! -d "$HOME/apps" ]; then fi function install_golang { + if command -v go ; then + return 0 + fi + local tmpDir=$(mktemp -d) local url="https://go.dev/dl/go$GO_VERSION.$OSTYPE-$ARCH.tar.gz" @@ -40,6 +44,9 @@ function install_golang { } function install_nodejs { + if command -v node ; then + return 0 + fi local tmpDir=$(mktemp -d) local arch="" @@ -81,6 +88,9 @@ function install_nodejs { } function install_rust { + if command -v cargo ; then + return 0 + fi curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile default -y }