27 lines
593 B
Plaintext
27 lines
593 B
Plaintext
|
#!/bin/zsh
|
||
|
source ${0:a:h}/common.zsh
|
||
|
__CHECK_IMPORTS
|
||
|
#####################################################################
|
||
|
|
||
|
__PUSH_ALL_MEDIA() {
|
||
|
local FLAGS=($@)
|
||
|
local FAILED_COUNT=0
|
||
|
|
||
|
__STATUS 'starting media upload to s3'
|
||
|
|
||
|
local TARGET
|
||
|
for TARGET in $AWS__S3__MEDIA_TARGETS
|
||
|
do
|
||
|
__SYNC_MEDIA push $TARGET $FLAGS || ((FAILED_COUNT+=1))
|
||
|
done
|
||
|
|
||
|
[[ $FAILED_COUNT -eq 0 ]] \
|
||
|
&& __SUCCESS 's3 media files now up-to-date' \
|
||
|
|| __FAIL $FAILED_COUNT 'unable to upload one or more targets' \
|
||
|
;
|
||
|
}
|
||
|
|
||
|
#####################################################################
|
||
|
|
||
|
__PUSH_ALL_MEDIA $@
|