diff options
Diffstat (limited to 'iptv.sh')
| -rwxr-xr-x | iptv.sh | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,6 +4,11 @@ set -euo pipefail # cURL configurations applied to all requests CURL_ARGS=(--silent --max-time 6) +# Color definitions +COLOR_DANGER=$(tput setaf 1) +COLOR_SUCCESS=$(tput setaf 2) +COLOR_RESET=$(tput sgr0) + show_usage () { echo "Usage: $0 [COMMAND] [OPTIONS]" echo "" @@ -42,9 +47,9 @@ show_decrypt_authinfo_usage () { echo "Usage: $0 decrypt:authinfo <authinfo>" } -step () { echo -e "\033[32m[-]\033[0m $1"; } +step () { printf '%s==> %s%s\n' "$COLOR_SUCCESS" "$1" "$COLOR_RESET"; } -fatal () { echo -e "\033[31m[!]\033[0m $1" >&2; exit 1; } +fatal () { printf '%s!!! %s%s\n' "$COLOR_DANGER" "$1" "$COLOR_RESET" >&2; exit 1; } ensure_curl_is_installed () { if ! command -v curl &>/dev/null; then |
