Clean and copy assets

This commit is contained in:
Valentin Brandl 2019-07-29 21:14:34 +02:00
parent 47680670c7
commit d70ad35e3b
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -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