2024-05-25 21:28:50 -05:00
|
|
|
# Ensure .config exists
|
|
|
|
mkdir -p ~/.config
|
|
|
|
|
2024-05-27 11:01:23 -05:00
|
|
|
# Copy all dotfiles
|
2024-05-26 21:47:00 -05:00
|
|
|
for entry in ~/.local/share/omakub/dotfiles/*; do
|
2024-05-27 11:01:23 -05:00
|
|
|
# Copy all root files as .file in ~/
|
2024-05-25 21:46:14 -05:00
|
|
|
# Any existing files will be renamed .bak
|
2024-05-26 21:47:00 -05:00
|
|
|
if [ -f $entry ]; then
|
|
|
|
target=~/."$(basename $entry)"
|
2024-05-27 11:01:23 -05:00
|
|
|
[ -e $target ] && mv $target $target.bak
|
|
|
|
cp $entry $target
|
2024-05-25 21:28:50 -05:00
|
|
|
fi
|
|
|
|
|
2024-05-27 11:01:23 -05:00
|
|
|
# Copy all directories in ~/.config/
|
2024-05-25 21:46:14 -05:00
|
|
|
# Any existing directories will be renamed .bak
|
2024-05-26 21:47:00 -05:00
|
|
|
if [ -d $entry ]; then
|
|
|
|
target=~/.config/"$(basename $entry)"
|
2024-05-27 11:01:23 -05:00
|
|
|
[ -e $target ] && mv $target $target.bak
|
|
|
|
cp -R $entry $target
|
2024-05-25 21:28:50 -05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
unset entry
|