}
function move_over () {
- # Move file to its offsite destination
- # $1: file, $2: relative directory (optional)
+ # Move file to its offsite destination.
+ # Expects the file to come from STDIN.
+ # $1: filename, $2: relative directory (optional)
if test -z "$1" || test -n "$3"; then
echo "Bad programming"
exit 1
if test -n "$2"; then
DEST=$DEST/$2
fi
- split -d -b ${CHUNKSIZE}m $FILE ${FILE}.
+ split -d -b ${CHUNKSIZE}m - ${FILE}.
for i in ${FILE}.*; do
s3_cmd put $DEST/$i $i
rm -f $i
done
- rm -f $FILE
}