gh0stzk / dotfiles

BSPWM environment with 18 themes. With a theme selector to change on the fly.
GNU General Public License v3.0
3.02k stars 225 forks source link

dotfiles overwritten #308

Closed Tom-jm03 closed 2 months ago

Tom-jm03 commented 2 months ago

nice your script overwrote my whole dotfiles... Maybe a check would be nice, if there already exists a directory named dotfiles...

0xN1nja commented 2 months ago

The check already exists, the script creates backup of your existing config at ~/.RiceBackup.

Tom-jm03 commented 2 months ago

Yeah, wow. One Folder called kitty something that is empty. I dont want to flame anyone, its my own fault i should have taken a deeper look at the script. But im just mad rn.

gh0stzk commented 2 months ago

oh yes that was a wtf moment!

I'm sorry about that, the script checks if a cloned folder called dotfiles already exists, and if so it deletes it assuming you are cloning the same dotfiles, since if not, it simply gives an error when cloning the repository. It's true that I can't predict all the different setups people have, possibly you had your dotfiles folder linked to the ../.config directory

Tom-jm03 commented 2 months ago

Maybe create a file in the installing process with a specific value inside that is also in the repo.

Add a if that checks if the file exists in the dotfiles directory and if the file has the specific value in it. If it does, the directory is your dotfiles one and you can safely erase it.

If it doesn't either the user deleted that file or it is not your repo, so the script breaks and tells you that a folder called dotfiles already exists and exits.

Tom-jm03 commented 2 months ago

Ima make a pr tomorrow.