Development journal, published to https://gmgauthier.com/
https://gmgauthier.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
594 B
25 lines
594 B
#!/usr/bin/env bash
|
|
|
|
if [[ -z "$1" ]]; then
|
|
echo "Supply a file with full path to be published"
|
|
exit 1
|
|
fi
|
|
|
|
file=$(basename "${1}")
|
|
|
|
# The assumption is all images are for the blog
|
|
if [[ "$1" =~ .*\.(gif|jpg|png) ]]; then
|
|
s3cmd put -P "${1}" s3://gmgauthier/blog/img/"${file}"
|
|
fi
|
|
|
|
# The assumption is all audio is for the podcast
|
|
if [[ "$1" =~ .*\.(mp3|ogg|wav) ]]; then
|
|
s3cmd put -P "${1}" s3://gmgauthier/podcast/audio/"${file}"
|
|
fi
|
|
|
|
# The assumption is all video is generic
|
|
if [[ "$1" =~ .*\.(mp4|mkv|m4v) ]]; then
|
|
s3cmd put -P "${1}" s3://gmgauthier/videos/"${file}"
|
|
fi
|
|
|
|
|
|
|