- 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
-
-else
- # Should we use colors ?
- case "$*" in
- *depend*)
- # Check user pref in portage
- RC_NOCOLOR="$(portageq envvar NOCOLOR 2>/dev/null)"
- [ "${RC_NOCOLOR}" = "true" ] && RC_NOCOLOR="yes"
- ;;
- *)
- # We do not want colors during emerge depend
- RC_NOCOLOR="yes"
- # No output is seen during emerge depend, so this is not needed.
- RC_ENDCOL="no"
- ;;
- esac
+if [ "$(/sbin/consoletype 2> /dev/null)" = "serial" ] ; then
+ # We do not want colors/endcols on serial terminals
+ RC_NOCOLOR="yes"
+ RC_ENDCOL="no"