Skip to content

Commit

Permalink
Check if asdf dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mmena1 committed Mar 15, 2024
1 parent 9cf8d3d commit bab7ce2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Martin Mena's Dotfiles

![main workflow](https://github.com/mmena1/dotfiles/actions/workflows/main.yml/badge.svg?event=push)

Welcome to my personal dotfiles repository, tailored for the 🐟 [Fish shell](https://fishshell.com/). These configurations are designed to streamline your development environment, integrating seamlessly with VSCode, Docker, and various programming languages via [.tool-versions](home/dot_tool-versions) through asdf. Dive into a setup that's both efficient and enjoyable to use, regardless of your expertise level.

<p align="center">
Expand Down
10 changes: 7 additions & 3 deletions home/.chezmoiscripts/run_once_after_02-asdf-install.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ install_asdf() {
echo
if ! _exists asdf ; then
answer=$(prompt "Would you like to install asdf?")
if [[ $answer =~ ^[Yy]$ ]] ;then
action "Cloning git repo..."
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 && source ~/.asdf/asdf.sh || { echo "Failed to clone asdf repository"; exit 1; }
if [[ $answer =~ ^[Yy]$ ]]; then
if [[ ! -d ~/.asdf ]]; then
action "Cloning git repo..."
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 && source ~/.asdf/asdf.sh || { echo "Failed to clone asdf repository"; exit 1; }
else
ok "asdf dir already exists, skipping cloning"
fi
else
ok "Skipping"
fi
Expand Down

0 comments on commit bab7ce2

Please sign in to comment.