From 329f9e177c087bc7a16d559db0d8104d6733f3b5 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sat, 3 Aug 2024 18:02:39 +0200 Subject: add cmd-like `pause` utility --- .local/share/bin/pause | 10 ++++++++++ .local/share/bin/yt-vod | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 .local/share/bin/pause diff --git a/.local/share/bin/pause b/.local/share/bin/pause new file mode 100755 index 0000000..8eedbfb --- /dev/null +++ b/.local/share/bin/pause @@ -0,0 +1,10 @@ +#!/bin/sh +ec=0 +if [ $# -ge 1 ] ; then + "$@" + ec=$? +fi +printf "Press enter to exit..." +read +exit $ec + diff --git a/.local/share/bin/yt-vod b/.local/share/bin/yt-vod index 3af9fb7..0eb424d 100755 --- a/.local/share/bin/yt-vod +++ b/.local/share/bin/yt-vod @@ -8,10 +8,10 @@ fi url="https://youtube.com/watch?v=$vid" # download chat -screen -d -m -S "yt-$vid-chat" -- yt-dlp --live-from-start --write-sub --no-download "$url" +screen -d -m -S "yt-$vid-chat" -- pause yt-dlp --live-from-start --write-sub --no-download "$url" # download stream -screen -d -m -S "yt-$vid-vod" -- yt-dlp --live-from-start -S ext "$url" +screen -d -m -S "yt-$vid-vod" -- pause yt-dlp --live-from-start -S ext "$url" echo "started recording! (use screen -r yt-$vid- to stop)" -- cgit v1.2.3