From d70ad35e3bb0174063200c9a430775fa31eca606 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Mon, 29 Jul 2019 21:14:34 +0200 Subject: [PATCH] Clean and copy assets --- frontend/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/build.sh b/frontend/build.sh index 0d058e7..c24d6e6 100755 --- a/frontend/build.sh +++ b/frontend/build.sh @@ -6,6 +6,7 @@ outdir="./output/" scriptdir="${outdir}scripts/" prepare() { + rm -rf "${outdir}" mkdir -p "${outdir}/scripts" } @@ -31,9 +32,14 @@ create_index() { SHA1="${sha1}" envsubst < template.html > "${outdir}/index.html" } +copy_assets() { + cp -r assets ${outdir} +} + prepare build minify sha1=$(sha1) rename_with_hash "${sha1}" create_index "${sha1}" +copy_assets