#!/bin/zsh
# ====================[ zprofile                           ]====================
#                     [ Time-stamp: "2009-04-18 19:23:19 leycec" ]
#
# --------------------( SYNOPSIS                           )--------------------
# Run after "zshenv" but before "zshrc" and "zlogin", for login shells.

# ....................{ INITIALIZATION                     }....................
echo "zeshy: loading \"/etc/zsh/zprofile\"..."

# ....................{ PROPERTIES                         }....................
# 077 would be more secure, but 022 is generally quite realistic.
umask 022

# ....................{ DEPENDENCIES                       }....................
# Import system-specific variables.
source /etc/zsh/zshenv.login

# Source "/etc/profile.d/" shell scripts. There tend to be few of these scripts.
# Unlike "/etc/env.d/" shell scripts, which perform simple variable assignments,
# these scripts perform more complex (and therefore time- and space-consumptive)
# functionality.
SHELL_OPTIONS=$-
setopt nullglob
for PROFILE_SCRIPT in /etc/profile.d/*.sh ; do
  [ -r "$PROFILE_SCRIPT" ] && source "$PROFILE_SCRIPT"
done
unsetopt nullglob
set -$SHELL_OPTIONS
unset sh SHELL_OPTIONS

# --------------------( COPYRIGHT AND LICENSE              )--------------------
# The information below applies to everything in this distribution,
# except where noted.
#              
# Copyleft 2010 by Cecil Curry.
#   
#   http://www.raiazome.com
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
