Simplify PNG files detection
authorHugo Villeneuve <hugo@hugovil.com>
Wed, 25 Oct 2023 20:03:10 +0000 (16:03 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 25 Oct 2023 20:03:10 +0000 (16:03 -0400)
fgen.sh

diff --git a/fgen.sh b/fgen.sh
index 1546f8a..b1bd4e2 100755 (executable)
--- a/fgen.sh
+++ b/fgen.sh
@@ -165,9 +165,7 @@ function generate_video()
     local png_files
 
     if which ffmpeg 1> /dev/null 2>&1; then
-        set +e
-        png_files=$(ls ${dest}/${dest}-${group}-f*.png 2> /dev/null)
-        set -e
+        png_files=$(ls ${dest}/${dest}-${group}-f*.png 2> /dev/null || echo "")
 
         if [ x"${png_files}" != x"" ]; then
             log_dbg "generate_video start"