Explain linking and .bak
This commit is contained in:
parent
336f041e27
commit
40bdd9660e
@ -3,12 +3,16 @@ mkdir -p ~/.config
|
||||
|
||||
# Link all dotfiles
|
||||
for entry in dotfiles/*; do
|
||||
# Link all root files as .file in ~/
|
||||
# Any existing files will be renamed .bak
|
||||
if [ -f "$entry" ]; then
|
||||
target=~/"$(basename "$entry")"
|
||||
target=~/."$(basename "$entry")"
|
||||
[ -e "$target" ] && mv "$target" "$target.bak"
|
||||
ln -s "$(pwd)/$entry" "$target"
|
||||
fi
|
||||
|
||||
# Link all directories in ~/.config/
|
||||
# Any existing directories will be renamed .bak
|
||||
if [ -d "$entry" ]; then
|
||||
target=~/.config/"$(basename "$entry")"
|
||||
[ -e "$target" ] && mv "$target" "$target.bak"
|
||||
|
Loading…
Reference in New Issue
Block a user