.dotfiles/install.sh

13 lines
354 B
Bash
Raw Permalink Normal View History

2021-01-17 17:45:32 +00:00
#!/bin/bash
2025-05-20 20:58:56 +00:00
## DOWNLOADED FROM GITHUB ##
2021-01-17 17:45:32 +00:00
# Find all dot files then if the original file exists, create a backup
# Once backed up to {file}.dtbak symlink the new dotfile in place
2025-05-20 20:58:56 +00:00
for file in $(find . -maxdepth 1 -name ".*" -type f -printf "%f\n" ); do
if [ -e ~/$file ]; then
mv -f ~/$file{,.dtbak}
2021-01-17 17:45:32 +00:00
fi
2025-05-20 20:58:56 +00:00
ln -s $PWD/$file ~/$file
2021-01-17 17:45:32 +00:00
done