diff options
Diffstat (limited to 'bundle-static-assets.sh')
| -rw-r--r-- | bundle-static-assets.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bundle-static-assets.sh b/bundle-static-assets.sh new file mode 100644 index 0000000..a5d5c5a --- /dev/null +++ b/bundle-static-assets.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +function bundle_static_assets { + STAMP="$(date +'%Y-%m-%d')" + ASSETS="$(find . -not -path './site/*' -a \( -name '*.jpg' -o -name '*.png' \) -print)" + echo "$ASSETS" | xargs -d'\n' tar -cvzf "./site/annex.tar.gz" +} + +if ! [ -d "./site/" ]; then + echo "./site/ does exist." + exit 1 +fi + +bundle_static_assets |