2021-03-22 15:59:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ "$1" == "" ]; then
|
|
|
|
echo template filename required
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-11-17 17:01:52 +01:00
|
|
|
preload=$(for f in frontend/_dist_/*.woff2; do
|
2021-03-22 15:59:05 +01:00
|
|
|
echo "<link rel=\"preload\" href=\"/_dist_/`basename $f`\" as=\"font\" type=\"font/woff2\" crossorigin />"
|
|
|
|
done)
|
|
|
|
|
|
|
|
template="`cat $1 | sed -e 's#<!--PRELOAD-->#\$preload#'`"
|
|
|
|
|
|
|
|
eval "cat <<EOF
|
|
|
|
$template
|
|
|
|
EOF"
|