summaryrefslogtreecommitdiff
path: root/tools/vkos.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/vkos.sh')
-rwxr-xr-xtools/vkos.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/vkos.sh b/tools/vkos.sh
index ebe0d66..69860de 100755
--- a/tools/vkos.sh
+++ b/tools/vkos.sh
@@ -8,6 +8,10 @@ die() {
exit 1
}
+vkos() {
+ $PROGNAME "$@"
+}
+
usage() {
cat <<EOF
usage: $PROGNAME [OPTIONS] COMMAND
@@ -20,6 +24,7 @@ Supported commands:
list NODE
fetch NODE PREFIX
merge
+ auto DATE
EOF
exit
}
@@ -31,6 +36,7 @@ NODE=
PREFIX=
FROM_BACKUP=0
DONT_DELETE=0
+DATE=
while [[ $# -gt 0 ]]; do
case "$1" in
list)
@@ -50,6 +56,12 @@ while [[ $# -gt 0 ]]; do
COMMAND="$1"
;;
+ auto)
+ COMMAND="$1"
+ DATE="$2"
+ shift
+ ;;
+
-b)
FROM_BACKUP=1
;;
@@ -96,4 +108,20 @@ case "$COMMAND" in
if [ "$DONT_DELETE" = "0" ]; then args="-D"; fi
$DIR/merge-recordings.py $args
;;
+
+ auto)
+ [ -z "$DATE" ] && usage
+ DATE_WO_DOTS=${DATE//./}
+
+ cd ~/vkos
+ mkdir $DATE
+ cd $DATE
+ for node in bh1 room; do
+ mkdir $node
+ cd $node
+ vkos fetch $node $DATE_WO_DOTS
+ vkos merge -d
+ cd ..
+ done
+ ;;
esac