summaryrefslogtreecommitdiff
path: root/bundle-static-assets.sh
blob: a5d5c5ac9da139c20586b159e59f841f3ddd1d9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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