yage
fa9bb38462
===================================================================== Finally decided to port personal scripts into a standalone library. --- Release Notes ------------------------ - added support for python, zsh, and zx scripts - added support for "interactive" scripts which drop the user to a REPL - added support for passing arguments to commands - added support for python/node virtualenv management through scwrypts - added contributing and usage docs - updated zsh plugin to write commands to history - licensed under GPLv3 --- New Scripts -------------------------- zsh/scwrypts ) - configure - environment/copy - environment/delete - environment/edit - environment/synchronize - logs/clear - logs/view zsh ) - aws/ecr/login - aws/efs/mount - aws/efs/unmount - aws/route53/backup - aws/s3/media-sync/pull - aws/s3/media-sync/push python ) - redis/interactive =====================================================================
27 lines
593 B
Bash
Executable File
27 lines
593 B
Bash
Executable File
#!/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 $@
|