From f4f9d0b790729dd406cfc50c4cb125185278e8c0 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Fri, 8 Nov 2024 12:05:48 +0100 Subject: [PATCH] adds clone feature to setup.sh --- setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.sh b/setup.sh index 81646c6..49fc667 100755 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash NIXOS_RELEASE=24.05 +GIT_REPO=https://git.mvl.sh/vleeuwenmenno/dotfiles.git # Check if $HOME/.dotfiles-setup exists, if so exit because setup has already been run if [ -f $HOME/.dotfiles-setup ]; then @@ -8,6 +9,14 @@ if [ -f $HOME/.dotfiles-setup ]; then exit 0 fi +# Check if $HOME/dotfiles exists, if not clone the dotfiles repo +if [ ! -d $HOME/dotfiles ]; then + tput setaf 3 + echo "Cloning dotfiles repo..." + tput sgr0 + git clone $GIT_REPO $HOME/dotfiles +fi + install_nix() { if [ -x "$(command -v nixos-version)" ]; then tput setaf 2