diff options
author | Ben Sima <ben@bsima.me> | 2020-02-25 08:20:56 -0800 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-02-25 08:20:56 -0800 |
commit | 3264d2d492a8b4a47109cb3620d46df291b44615 (patch) | |
tree | 5ebe17d98a6c35383367f5c16e0eeabceecfc448 /vlog | |
parent | 5113dc81627fd719abf816ff13dccaf847ce835e (diff) |
Check DIR exists before recording
Yeah this just bit me...
Diffstat (limited to 'vlog')
-rwxr-xr-x | vlog | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -10,6 +10,13 @@ FILE=$(date +%Y.%m.%d..%H.%M) DIR=${VLOGDIR:-/mnt/lake/ben/videos} SIZE=1920x1080 +if [ ! -d "$DIR" ] +then + echo "error: $DIR does not exist" + exit 1 +fi + + OUTFILE="$DIR/$FILE.mkv" echo "recording to: $OUTFILE" |