yage
2dcf94199b
===================================================================== Changed environment dependency checker to be more automatic
28 lines
622 B
Bash
Executable File
28 lines
622 B
Bash
Executable File
#!/bin/zsh
|
|
_DEPENDENCIES+=()
|
|
_REQUIRED_ENV+=()
|
|
source ${0:a:h}/common.zsh
|
|
#####################################################################
|
|
|
|
__PULL_ALL_MEDIA() {
|
|
local FLAGS=($@)
|
|
local FAILED_COUNT=0
|
|
|
|
__STATUS 'starting media download from s3'
|
|
|
|
local TARGET
|
|
for TARGET in $AWS__S3__MEDIA_TARGETS
|
|
do
|
|
__SYNC_MEDIA pull $TARGET $FLAGS || ((FAILED_COUNT+=1))
|
|
done
|
|
|
|
[[ $FAILED_COUNT -eq 0 ]] \
|
|
&& __SUCCESS 'local media files now up-to-date' \
|
|
|| __FAIL $FAILED_COUNT 'unable to download one or more targets' \
|
|
;
|
|
}
|
|
|
|
#####################################################################
|
|
|
|
__PULL_ALL_MEDIA $@
|