fix: dotfiles install script with make

This commit is contained in:
Victor Westerlund 2025-12-22 22:02:17 +00:00
parent 82cd2c6423
commit 426afc6868
3 changed files with 8 additions and 6 deletions

2
.gitignore vendored
View file

@ -14,6 +14,8 @@
!.bash_aliases
!.bash_profile
!.local/bin/
!.local/bin/scripts/
!.local/bin/scripts/install_dotfiles.sh
!.local/bin/git-hooks/
!.local/bin/git-hooks/pre-commit
!.local/bin/code_server_export_extensions

View file

@ -0,0 +1,5 @@
#!/bin/sh
cp -rp . $HOME
cd ..
rm -r dotfiles

View file

@ -2,12 +2,7 @@ install: dotfiles git-hooks
# Install dotfiles in users home directory
dotfiles:
@if [ -d dotfiles ]; then \
cp -r ./dotfiles/. $HOME \
rm -rf dotfiles \
else \
echo "Dotfiles already installed or folder is missing"; \
fi
./.local/bin/scripts/install_dotfiles.sh
# Use tracked git hooks
git-hooks: