From: Chris Koeritz Date: Tue, 23 Oct 2018 18:38:38 +0000 (-0400) Subject: enhancement--not complaining about empty save dirs X-Git-Tag: 2.140.115^2~81 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=39d2d6eb71e6d651d73b661523f08eb221345910 enhancement--not complaining about empty save dirs now you don't get nastygrams if a game's save dir exists but there are no save files to save; it just skips that one. play it some more and you'll see the saves show up again. --- diff --git a/scripts/customize/fred/scripts/games/gamesaver.sh b/scripts/customize/fred/scripts/games/gamesaver.sh index 2beec56d..9a8399d3 100644 --- a/scripts/customize/fred/scripts/games/gamesaver.sh +++ b/scripts/customize/fred/scripts/games/gamesaver.sh @@ -30,7 +30,7 @@ function copyem() source_dir="$1"; shift out_dir="$1"; shift - if [ -d "$source_dir" ]; then + if [ -d "$source_dir" -a $(ls "$source_dir" 2>/dev/null | wc -c) != 0 ]; then echo $game_name if [ ! -d "$out_dir" ]; then mkdir -p "$out_dir"