Browse Source

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.
Pavel Machek 1 year ago
parent
commit
63a77bb557
1 changed files with 2 additions and 2 deletions
  1. 2 2
      movie.sh.in

+ 2 - 2
movie.sh.in

@@ -13,8 +13,8 @@ echo DEST_NAME $DEST_NAME 1>&2
 echo FPS $FPS dfps 1>&2
 echo FPS $FPS dfps 1>&2
 
 
 if [ "-$1" == "-start" ]; then
 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 &
 	@LIBEXECDIR@/movie_audio_rec $FPS &
 	echo $! > $GIGA_DIR/audio.pid
 	echo $! > $GIGA_DIR/audio.pid
 elif [ "-$1" == "-stop" ]; then
 elif [ "-$1" == "-stop" ]; then