From 63a77bb55719023fcea94ca7b2698a44bc5905ed Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Thu, 9 May 2024 21:52:56 +0200 Subject: [PATCH] Add robustness against out of disk space. Shell is ugly programing language, and by continuing after error, we were creating recording in wrong directory. Fix that up. --- movie.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/movie.sh.in b/movie.sh.in index 3df9cde..530042f 100755 --- a/movie.sh.in +++ b/movie.sh.in @@ -13,8 +13,8 @@ echo DEST_NAME $DEST_NAME 1>&2 echo FPS $FPS dfps 1>&2 if [ "-$1" == "-start" ]; then - mkdir $GIGA_DIR/sm - cd $GIGA_DIR/sm + mkdir $GIGA_DIR/sm || echo Message: NOSPC + cd $GIGA_DIR/sm || exit 1 @LIBEXECDIR@/movie_audio_rec $FPS & echo $! > $GIGA_DIR/audio.pid elif [ "-$1" == "-stop" ]; then