X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/blobdiff_plain/37839f02d2abe6c5639730ce59e4f16f9508695c..a5a60f0c2c38227fdd12a90c2cd81871baf8d41f:/s3.common diff --git a/s3.common b/s3.common index 51d3637..09d1e77 100644 --- a/s3.common +++ b/s3.common @@ -31,8 +31,9 @@ function s3_cmd () { } 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 @@ -42,12 +43,11 @@ function move_over () { 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 }