1234567891011121314151617181920212223242526272829303132 |
- #!/bin/bash
- echo=echo
- for cmd in echo /bin/echo; do
- $cmd >/dev/null 2>&1 || continue
- if ! $cmd -e "" | grep -qE '^-e'; then
- echo=$cmd
- break
- fi
- done
- CSI=$($echo -e "\033[")
- CEND="${CSI}0m"
- CDGREEN="${CSI}32m"
- CRED="${CSI}1;31m"
- CGREEN="${CSI}1;32m"
- CYELLOW="${CSI}1;33m"
- CBLUE="${CSI}1;34m"
- CMAGENTA="${CSI}1;35m"
- CCYAN="${CSI}1;36m"
- CSUCCESS="$CDGREEN"
- CFAILURE="$CRED"
- CQUESTION="$CMAGENTA"
- CWARNING="$CYELLOW"
- CMSG="$CCYAN"
|