make ls s3 cmd

master
Bel LaPointe 2020-02-07 08:09:16 -07:00
parent d3a169ae19
commit d39c226d13
1 changed files with 23 additions and 0 deletions

23
cli/ls_s3.sh Normal file
View File

@ -0,0 +1,23 @@
#! /bin/bash
function main() {
local bucket=${BUCKET:-"geni-backup-b1-dr3"}
local region=${REGION:-"us-west-2"}
local user=${AWS_USER:-"AKIA4TVJAYO63KP3QJJK"}
local pass="${AWS_PASS:-"YXlRDCKZPDMWF7qXZIa/t4aBi2WCpd8uu2LWSZwQ"}"
local min="${1:-"---"}"
local max="${2:-"}}}"}"
go run main.go \
-do list \
-db minio \
-addr "https://s3-$region.amazonaws.com" \
-user "$user" \
-pass "$pass" \
-ns "$bucket" \
-min "$min" \
-max "$max"
}
if [ "$0" == "$BASH_SOURCE" ]; then
main "$@"
fi