- local x=
- local ref="$1"
- shift
-
- for x in "$@" ; do
- [[ ${x} -nt ${ref} ]] && return 0
-
- if [[ -d ${x} ]] ; then
- is_older_than "${ref}" "${x}"/* && return 0
- fi
- done
-
- return 1
-}
-
-if [ -z "${EBUILD}" ] ; then
- # Setup a basic $PATH. Just add system default to existing.
- # This should solve both /sbin and /usr/sbin not present when
- # doing 'su -c foo', or for something like: PATH= rcscript start
- PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:${PATH}"
-
- if [ "$(/sbin/consoletype 2> /dev/null)" = "serial" ] ; then
- # We do not want colors/endcols on serial terminals
- RC_NOCOLOR="yes"
- RC_ENDCOL="no"
- fi
-
- for arg in "$@" ; do
- case "${arg}" in
- # Lastly check if the user disabled it with --nocolor argument
- --nocolor|-nc)
- RC_NOCOLOR="yes"
- ;;
- esac
- done