diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cc186d5..7900cc54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release - Replace raw echo with output helpers in git/all-to-default-branch - Replaced raw echo calls with die/info/success output helpers in general/wallpaper - Replace raw echo with output helpers in general/update-dotnet-tools +- Replace raw echo with output helpers in general/stream ### Changed - Replace raw echo with standard output helpers (die/info/success) in github/cancel-workflows - Replace raw echo with standard output helpers (die/info/success) in git/update-repos-personal diff --git a/general/stream b/general/stream index 7e5f05c4..8b4d9b4b 100755 --- a/general/stream +++ b/general/stream @@ -1,16 +1,23 @@ #! /bin/sh die() { - echo - echo "$@" + printf '\n\033[31m✗\033[0m %s\n' "$*" >&2 exit 1 } +success() { + printf '\n\033[32m✓\033[0m %s\n' "$*" +} + +info() { + printf '\n\033[32m→\033[0m %s\n' "$*" +} + STREAMER=$1 [ -z "$STREAMER" ] && die "Streamer not specified" while true -do +do streamlink --player=mpv "https://twitch.tv/$STREAMER" best > /dev/null 2>&1 sleep 60 done