#!/bin/sh bucket="$1" bktpath="$2" location="$3" echo $0 $* >> /tmp/cdn-$bucket.log if [ -z "$bucket" -o -z "$bktpath" -o -z "$location" ]; then echo "$0 bucketName bucketWithPath storageLocation" | tee -a /tmp/cdn-$bucket.log exit 2 fi cmd="/data/wre/prereqs/bin/s3cmd --config=/data/WebGUI/etc/$bucket.s3cfg del --recursive 's3://$bktpath/$location' >> /tmp/cdn-$bucket.log" echo "$cmd" >> /tmp/cdn-$bucket.log eval $cmd status="$?" echo status $status >> /tmp/cdn-$bucket.log exit $status