#!/bin/sh

: ${BuildOutputDir?"BuildOutputDir not specified"}
: ${AmazonS3Bucket?"AmazonS3Bucket not specified"}
: ${BuildScriptPath?"BuildScriptPath not specified"}

if [ $# -lt 1 ]
then
    echo "Usage: `basename ${0}` upload_file"
    exit
fi

FileName=${1}
AWSKey=14BNQ9JMVGQ87T6R60R2
AWSSecret="h+3OQE+xlJYc/ktfOZYWzmiRbjmnNRX3najVoD5Q"

echo 'Uploading to Amazon S3 Service'

${BuildScriptPath}/s3put -a ${AWSKey} -s ${AWSSecret} -b ${AmazonS3Bucket} -g public-read ${FileName}

echo 'Complete'
