[Pkg-zsh-devel] Zsh Upload to Experimental ahead: debian/rules with "dh $@" and support for /etc/zsh/zprofile.d/ or so
Daniel Shahaf
d.s at daniel.shahaf.name
Tue Nov 14 13:17:23 UTC 2017
Axel Beckert wrote on Sun, Nov 12, 2017 at 16:21:06 +0100:
> * Nearly the same package sizes. (Interestingly the new packages are
> all slightly smaller. Not sure where that comes from or if it means
> that I missed something.)
diffoscope might help?
> Excerpt from original Debian /etc/profile:
>
> if [ -d /etc/profile.d ]; then
> for i in /etc/profile.d/*.sh; do
> if [ -r $i ]; then
> . $i
> fi
> done
> unset i
> fi
>
> So my current idea is to add this to /etc/zsh/zprofile (untested):
>
> if [[ -d /etc/zsh/zprofile.d ]]; then
> for i in /etc/zsh/zprofile.d/*.zsh; do
> if [[ -r "${i}" ]]; then
> . "${i}"
> fi
> done
> unset i
> fi
I think this should be just «for i in .../*.zsh(N)» with (N) and without
a surrounding 'if', in case zprofile.d exists and is empty. At that
point I'm not even sure the -r test is needed: it's required in sh due
to the "/etc/profile.d/ is empty" case, but it's not clear to me that
it's needed otherwise. (Do we expect downstreams to put
non-world-readable files in zprofile.d?)
Cheers,
Daniel
More information about the Pkg-zsh-devel
mailing list