fix: pull and link repos if homeshick already installed

This commit is contained in:
Kitty Fangs 2024-05-20 05:29:25 +00:00
parent d9e42c210f
commit 4eb9fda73b
1 changed files with 18 additions and 9 deletions

27
init.sh
View File

@ -31,6 +31,15 @@ if [[ ! -d $HOME/.homesick ]]; then
## Link everything
homeshick link --force
else
## Update the repos
if ! command -v homeshick &>/dev/null; then
source "$HOME/.homesick/repos/homeshick/homeshick.sh"
source $HOME/.homesick/repos/homeshick/completions/homeshick-completion.bash
fi
homeshick pull
homeshick link
fi
@ -44,17 +53,17 @@ if ! command -v brew &>/dev/null; then
fi
## All my asdf
if [[ ! -d $HOME/.asdf ]]; then
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
git -C ~/.asdf checkout "$(git -C ~/.asdf describe --abbrev=0 --tags)"
# if [[ ! -d $HOME/.asdf ]]; then
# git clone https://github.com/asdf-vm/asdf.git ~/.asdf
# git -C ~/.asdf checkout "$(git -C ~/.asdf describe --abbrev=0 --tags)"
# shellcheck source=/dev/null
source "$HOME/.asdf/asdf.sh"
# # shellcheck source=/dev/null
# source "$HOME/.asdf/asdf.sh"
asdf plugin-add python
asdf install python latest
asdf global python latest
fi
# asdf plugin-add python
# asdf install python latest
# asdf global python latest
# fi
# Init Starship
eval "$(starship init bash)"