The script uses bash-specific syntax ${VAR,,} for lowercase string comparison on line 57, which causes a "bad substitution" error when executed in zsh.
While the ownership transfer itself succeeds, the verification step fails, leaving users uncertain whether the operation completed. Replace the bash-specific lowercase conversion with a portable alternative like tr '[:upper:]' '[:lower:]' or explicitly require bash execution.