545f5078 |
#!/bin/sh
set -e -x
./s3cmd mb s3://s3cmd-autotest
./s3cmd ls s3://s3cmd-autotest
./s3cmd put s3cmd s3cmd.1 s3://s3cmd-autotest
./s3cmd ls s3://s3cmd-autotest
./s3cmd del s3://s3cmd-autotest/s3cmd.1
./s3cmd get s3://s3cmd-autotest/s3cmd s3cmd.get
diff s3cmd s3cmd.get
rm -fv s3cmd.get
|
d1ff5959 |
set +x |
545f5078 |
echo; echo
echo "=== Now running 'sync' tests ==="
echo; echo |
d1ff5959 |
set -x |
545f5078 |
VER=$(./s3cmd --version | cut -d\ -f3)
tar xvfz dist/s3cmd-${VER}.tar.gz
echo "Will be removed" > s3cmd-${VER}/file.to.remove
./s3cmd sync s3cmd-${VER} s3://s3cmd-autotest/sync-test
echo "Added file" > s3cmd-${VER}/added.file
rm -f s3cmd-${VER}/file.to.remove
./s3cmd sync --delete s3cmd-${VER} s3://s3cmd-autotest/sync-test |
d1ff5959 |
rm -f s3cmd-${VER}/S3/PkgInfo.py
rm -f s3cmd-${VER}/s3cmd
./s3cmd sync --delete --exclude "/s3cmd-${VER}/S3/*" s3://s3cmd-autotest/sync-test s3cmd-${VER} |
545f5078 |
rm -rf s3cmd-${VER}
./s3cmd rb s3://s3cmd-autotest/ || true
# ERROR: S3 error: 409 (Conflict): BucketNotEmpty
# hack to remove all objects from a bucket
mkdir empty
./s3cmd sync --delete empty/ s3://s3cmd-autotest
rm -rf empty
./s3cmd rb s3://s3cmd-autotest/
|
d1ff5959 |
set +x
|
545f5078 |
echo; echo
echo; echo
echo "=== All good. Ready for release :-) ==="
echo |