Initial attempt at rsync.net backup solution.
[clinton/scripts.git] / rsync.net-move-over
CommitLineData
614d68fa 1#!/bin/bash
2
3BACKUPDIR=/vicepa/hcoop-backups/files
4
5function move_over () {
6 # Move file to its final destination.
7 # Expects the file to come from STDIN.
8 # $1: date subdirectory
9 # $2: filename
10 if test -z "$2" || test -n "$3"; then
11 echo >&2 "Bad programming"
12 exit 1
13 fi
14 local subdir=$1
15 local file=$2
16 local dest=$BACKUPDIR/$subdir/$file
17 tee $dest > /dev/null
18}
19
20move_over $@