Link all the dotfiles
This commit is contained in:
parent
cd9184b67e
commit
f3b60cfe9d
19
install/dotfiles.sh
Normal file
19
install/dotfiles.sh
Normal file
@ -0,0 +1,19 @@
|
||||
# Ensure .config exists
|
||||
mkdir -p ~/.config
|
||||
|
||||
# Link all dotfiles
|
||||
for entry in dotfiles/*; do
|
||||
if [ -f "$entry" ]; then
|
||||
target=~/"$(basename "$entry")"
|
||||
[ -e "$target" ] && mv "$target" "$target.bak"
|
||||
ln -s "$(pwd)/$entry" "$target"
|
||||
fi
|
||||
|
||||
if [ -d "$entry" ]; then
|
||||
target=~/.config/"$(basename "$entry")"
|
||||
[ -e "$target" ] && mv "$target" "$target.bak"
|
||||
ln -s "$(pwd)/$entry" "$target"
|
||||
fi
|
||||
done
|
||||
|
||||
unset entry
|
Loading…
Reference in New Issue
Block a user