Although GNU stow is very interesting, I like this simple script because it has no external dependencies. Stow is not available on macos by default, for example.
It is available though in every package manager for macOS except the App Store, and any user of a script like this on macOS is probably also using Homebrew, macports, Nix, or srcpkg.