diff --git a/.config/dotfiles/install.sh b/.config/dotfiles/install.sh index b2ce4de..74cd15a 100755 --- a/.config/dotfiles/install.sh +++ b/.config/dotfiles/install.sh @@ -19,6 +19,19 @@ do esac done +# Clone dotfiles +bold "Cloning dotfiles repo" +grep -sqxF ".dotfiles" ~/.gitignore || echo ".dotfiles" >> ~/.gitignore +if [[ ! -d ~/.dotfiles ]]; then + git clone -q --bare git@github.com:mortenfyhn/dotfiles.git ~/.dotfiles + dots() { git --git-dir="$HOME"/.dotfiles/ --work-tree="$HOME" "$@"; } + dots checkout --force + dots config --local status.showUntrackedFiles no + dots config --local --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + dots fetch +fi +echo "Done" + if [[ "$headless" = false ]] then # Add Vivaldi repo @@ -155,19 +168,6 @@ font_dir=$(mktemp -d) git clone --quiet --depth=1 https://github.com/powerline/fonts.git "$font_dir" && "$font_dir/install.sh" echo "Done" -# Clone dotfiles -bold "Cloning dotfiles repo" -grep -sqxF ".dotfiles" ~/.gitignore || echo ".dotfiles" >> ~/.gitignore -if [[ ! -d ~/.dotfiles ]]; then - git clone -q --bare git@github.com:mortenfyhn/dotfiles.git ~/.dotfiles - dots() { git --git-dir="$HOME"/.dotfiles/ --work-tree="$HOME" "$@"; } - dots checkout --force - dots config --local status.showUntrackedFiles no - dots config --local --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - dots fetch -fi -echo "Done" - # Load dconf settings bold "Load MATE desktop environment settings" if command -v dconf > /dev/null