--- /dev/null
+#!/bin/bash
+
+BACKUPDIR=/vicepa/hcoop-backups/files
+
+function move_over () {
+ # Move file to its final destination.
+ # Expects the file to come from STDIN.
+ # $1: date subdirectory
+ # $2: filename
+ if test -z "$2" || test -n "$3"; then
+ echo >&2 "Bad programming"
+ exit 1
+ fi
+ local subdir=$1
+ local file=$2
+ local dest=$BACKUPDIR/$subdir/$file
+ tee $dest > /dev/null
+}
+
+move_over $@