Doors/scripts/copy_and_link

28 lines
582 B
Text
Raw Normal View History

#!/bin/sh
2024-01-07 02:24:12 -05:00
set -e
# Copy configs and make a backup if it already exists
2024-01-09 20:38:24 -05:00
printf "\nInstalling Configs..."
2024-01-10 00:21:14 -05:00
cd configs
for file in *
2024-01-09 20:38:24 -05:00
do
printf "\n%s..." "$file"
2024-01-10 00:21:14 -05:00
cp -rb "$file" "$HOME"/.config/
2024-01-09 20:38:24 -05:00
done
# Copy scripts and make a backup if it already exists
2024-01-10 00:21:14 -05:00
printf "\n\nInstalling Scripts..."
cd ../
if [ ! -d "$HOME/.local/bin" ]; then
mkdir "$HOME/.local/bin"
fi
2024-01-10 00:21:14 -05:00
cp -rb bin "$HOME"/.local
# Link shell files and make a backup if it already exists
2024-01-10 00:21:14 -05:00
printf "\nLinking shell...\n"
cp -sb "$HOME"/.config/shell/profile ~/.zprofile
cp -sb "$HOME"/.config/x11/xinitrc ~/.xinitrc