diff --git a/update-repo.sh b/update-repo.sh new file mode 100644 index 0000000..e49e94a --- /dev/null +++ b/update-repo.sh @@ -0,0 +1,71 @@ +#!/usr/bin/bash + +printf "\n" + +echo "Running this script will override data in current repo with user configurations." +echo "This script is intended to be used by repository owner(retrozinndev)" + +printf "\n" + +echo " WARN! Please run this script in it's current directory to avoid problems" +echo "Tip: Press Ctrl + C to stop script" + +printf "\n" + +if [ ! -f ./update-repo.sh ] +then + echo "[ERROR] Looks like you're not in the repo directory, please run this script from the dotfiles repository directory." + printf "Finishing with errors...\n" + exit 1 +fi + +echo "Starting in 3... " +sleep 1s +echo "2..." +sleep 1s +echo "1..." +sleep 1s + +printf "\n" + + +echo "[info] Cleaning current repo dotfiles..." +# Modify dirs here when adding something new: +rm -rf ./wofi/ ./waybar/ ./swaync/ ./hyprland/ ./hyprlock ./hypridle ./hyprpaper + +echo "Done cleaning." + +echo "[info] Copying Hyprland dotfiles... (hyprland, hypridle, hyprlock, hyprpaper)" +cp -r $HOME/.config/hypr ./ + + +echo "[info] Organizing:" +echo "-> Hypridle" +mkdir -p ./hypridle +cp ./hypr/hypridle.conf ./hypridle/ + +echo "-> Hyprlock" +mkdir -p ./hyprlock +cp ./hypr/hyprlock.conf ./hyprlock/ + +echo "-> Hyprpaper" +mkdir ./hyprpaper +cp ./hypr/hyprpaper.conf ./hyprpaper/ + +echo "[info] Copying Waybar..." +cp -r $HOME/.config/waybar . + +echo "[info] Copying Wofi..." +cp -r $HOME/.config/wofi . + +echo "[info] Copying Swaync..." +cp -r $HOME/.config/swaync . + +printf "\nDone! You may now push this to the dotfiles repo!\n" + +if [ -f /bin/git ] +then + git status +fi + +exit 0