Avoid errors if "set -u" (or "nounset") is in effect, don't leak $ID in the environment, drop unnecessary test for /usr/bin/id. 'git am'able patch attached, let me know if you'd like me to push and build this for devel.
Created attachment 1160902 [details] sh profile.d improvements: don't leak $ID, don't fail on nounset
BTW I think it'd be cleaner to have vim.sh and vim.csh as separate scripts instead of being embedded in the specfile. Suppose the only reason for the embedding is the use of %{_bindir} in vim.sh which could be replaced by "hardcoded" /usr/bin/id. vim.csh already does that so there should be no reason to embed it. I can take care of this as well, just let me know.
You're right, thanks for noticing the ID leak. No harm done by that, but it's unnecessary. I'll push a new vim package soon with these fixes and move vim.sh and vim.csh into rpm source files.