adds clone feature to setup.sh

This commit is contained in:
2024-11-08 12:05:48 +01:00
parent 60f8f6ae78
commit f4f9d0b790

View File

@ -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