diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.org> | 2025-06-01 06:04:11 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.org> | 2025-06-01 06:13:33 -0400 |
| commit | 0dbca7d4a8a71e0f27f28ea7fee6e8071a4a8d89 (patch) | |
| tree | 31fb2a740378bc9a5e7e5f3862f5da49164d180c /bundle-static-assets.sh | |
| parent | 894506d2fddd6057b54026cada923c5d21de0908 (diff) | |
Remove binary assets from repository
`git-annex' is neat, but overkill for this use-case. All I want is to
avoid checking binary files into source control; I don't necessarily
care about tracking changes on those binary files. You can get all the
assets you need from 'https://jakob.space/annex.tar.gz' and extract it
over the repository root.
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 |