mirror of
https://codeberg.org/vlw/dotfiles.git
synced 2026-01-12 05:45:59 +01:00
fix: dotfiles install script with make
This commit is contained in:
parent
82cd2c6423
commit
426afc6868
3 changed files with 8 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -14,6 +14,8 @@
|
||||||
!.bash_aliases
|
!.bash_aliases
|
||||||
!.bash_profile
|
!.bash_profile
|
||||||
!.local/bin/
|
!.local/bin/
|
||||||
|
!.local/bin/scripts/
|
||||||
|
!.local/bin/scripts/install_dotfiles.sh
|
||||||
!.local/bin/git-hooks/
|
!.local/bin/git-hooks/
|
||||||
!.local/bin/git-hooks/pre-commit
|
!.local/bin/git-hooks/pre-commit
|
||||||
!.local/bin/code_server_export_extensions
|
!.local/bin/code_server_export_extensions
|
||||||
|
|
|
||||||
5
.local/bin/scripts/install_dotfiles.sh
Executable file
5
.local/bin/scripts/install_dotfiles.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cp -rp . $HOME
|
||||||
|
cd ..
|
||||||
|
rm -r dotfiles
|
||||||
7
Makefile
7
Makefile
|
|
@ -2,12 +2,7 @@ install: dotfiles git-hooks
|
||||||
|
|
||||||
# Install dotfiles in users home directory
|
# Install dotfiles in users home directory
|
||||||
dotfiles:
|
dotfiles:
|
||||||
@if [ -d dotfiles ]; then \
|
./.local/bin/scripts/install_dotfiles.sh
|
||||||
cp -r ./dotfiles/. $HOME \
|
|
||||||
rm -rf dotfiles \
|
|
||||||
else \
|
|
||||||
echo "Dotfiles already installed or folder is missing"; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use tracked git hooks
|
# Use tracked git hooks
|
||||||
git-hooks:
|
git-hooks:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue