1
1
mirror of https://github.com/rsms/inter.git synced 2024-12-25 16:44:27 +03:00

web: trying to work around issues with jekyll

This commit is contained in:
Rasmus Andersson 2018-09-11 23:40:33 -07:00
parent 26a7168d83
commit d064cad96f

View File

@ -2,23 +2,27 @@
set -e
cd "$(dirname "$0")/.."
if [ ! -d lab/fonts ]; then
if [ ! -s lab/fonts ]; then
rm -rf lab/fonts
ln -fs ../../build/fonts lab/fonts
fi
rm -rf _site
# jekyll is a little dumb and resolves the lab/fonts symlink and copies
# all font files to _site when started. Bad jekyll.
# Let's work around that.
#
# Step 1/2: remove any previous symlink, or jekyll crashes
rm -f _site/lab/fonts
#
# Step 2/2: create symlink again after some delay. Ugh.
sh <<_EOF_ &
N=3
while [ \$N -gt 0 ]; do
sleep 1
rm -f _site/lab/fonts
ln -fs ../../../build/fonts _site/lab/fonts
sleep 5
if [ -d _site/lab/fonts ]; then
rm -rf _site/lab/fonts
else
rm -f _site/lab/fonts
fi
ln -fs ../../../build/fonts _site/lab/fonts
let N=N-1
done