Skip to content

Commit

Permalink
Use nullglob in a for loop in cron.sh. This closes #10.
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Larrosa committed Jun 29, 2015
1 parent 3c15234 commit 9004ac6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,17 @@ if [ -n "$RENDER" ]; then
cp -a "$f" "$LOCAL/"
done
pushd "$LOCAL/"
shopt -s nullglob
copied=
for i in *-label*.png ; do
ln -s $i ${i//-label} ;
copied=1
done
shopt -u nullglob
if [ ! -n "$copied" ]; then
echo "There seems to be no generated images. Please check the output of \"./render.py $RFLAGS $LOCAL/\""
exit 1
fi
popd
fi

Expand Down

0 comments on commit 9004ac6

Please sign in to comment.