-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbalrog-dbg.sh
More file actions
executable file
·33 lines (30 loc) · 829 Bytes
/
balrog-dbg.sh
File metadata and controls
executable file
·33 lines (30 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
echo "***********************"
echo "IMPORTANT: Invoke this script as ./balrog.sh 2>&1 | tee stdout.log"
echo "***********************"
echo "Executing Balrog with extra dbg info"
# Add OpenCV debug variables
export OPENCV_PYTHON_DEBUG=true
export OPENCV_LOG_LEVEL=DEBUG
SNAP_ID=1
while : ; do
python3 -v -m balrog
case $? in
255)
echo "Exiting balrog script"
mkdir -p /data/balrog-snaps/snap"$SNAP_ID"
mv -f /data/balrog-logs/* /data/balrog-snaps/snap"$SNAP_ID"
((SNAP_ID++))
break
;;
*)
# Whatever else will be interpreted as a restart of teh script
echo "Restarting balrog script in 3 seconds"
mkdir -p /data/balrog-snaps/snap"$SNAP_ID"
mv -f /data/balrog-logs/* /data/balrog-snaps/snap"$SNAP_ID"
((SNAP_ID++))
sleep 3
true
;;
esac
done