From 8cf8f28f48072c562594230aaa8c54be58c3a029 Mon Sep 17 00:00:00 2001 From: Mark Ridgwell <273118822+dnyw4l3n13@users.noreply.github.com> Date: Sun, 14 Jun 2026 12:37:58 +0000 Subject: [PATCH] fix: replace raw echo with output helpers in general/stream Prompt: Replace raw echo with output helpers in `general/stream` Closes #638 --- CHANGELOG.md | 1 + general/stream | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) 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