https://github.com/matheusmoreira/.files/blob/master/GNUmake...
https://www.matheusmoreira.com/articles/managing-dotfiles-wi...
It even supports the XDG stuff as well as variables like GNUPGHOME.
https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-t...
I mean, yea, if it works for you, great! But all of the above are problems I did have. I grew a custom install script for years. Now I use Home Manager and the impermanence module.
No need for those complex software, just shell script is enough for me.
Maybe you haven't lost data from this yet, but this is where Chezmoi has nice guardrails and protects against, e.g., modifications or additions accidentally being made to $HOME instead of the dotfiles dir, which look like they would be silently blown out by your current process.
Just my 2¢ from someone who used to do it this way and lost data because of it.
EDIT: Unless I have a dir called "*" in my dotfiles, but at that point I deserve to have my home dir removed :P ZSH also asks for confirmation first
https://github.com/pprotas/dotfiles/blob/main/symlink.sh
That's it.