summaryrefslogtreecommitdiff
path: root/vlog
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-02-25 08:20:56 -0800
committerBen Sima <ben@bsima.me>2020-02-25 08:20:56 -0800
commit3264d2d492a8b4a47109cb3620d46df291b44615 (patch)
tree5ebe17d98a6c35383367f5c16e0eeabceecfc448 /vlog
parent5113dc81627fd719abf816ff13dccaf847ce835e (diff)
Check DIR exists before recording
Yeah this just bit me...
Diffstat (limited to 'vlog')
-rwxr-xr-xvlog7
1 files changed, 7 insertions, 0 deletions
diff --git a/vlog b/vlog
index 0f79787..8a83e59 100755
--- a/vlog
+++ b/vlog
@@ -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"