Raphhh / samurai

PHP scaffolding tool - bootstrap a new project
MIT License
19 stars 5 forks source link

use profile.d/script.sh instead of update /etc/profile directly #3

Closed lgnap closed 9 years ago

lgnap commented 9 years ago

According to /etc/profile file every xxx.sh script will be loaded.

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        if [ "${-#*i}" != "$-" ]; then
            . "$i"
        else
            . "$i" >/dev/null
        fi
    fi
done
Raphhh commented 9 years ago

thanks :)