web: trying to work around issues with jekyll
This commit is contained in:
parent
26a7168d83
commit
d064cad96f
1 changed files with 11 additions and 7 deletions
|
|
@ -2,23 +2,27 @@
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
if [ ! -d lab/fonts ]; then
|
if [ ! -s lab/fonts ]; then
|
||||||
|
rm -rf lab/fonts
|
||||||
ln -fs ../../build/fonts lab/fonts
|
ln -fs ../../build/fonts lab/fonts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -rf _site
|
||||||
|
|
||||||
# jekyll is a little dumb and resolves the lab/fonts symlink and copies
|
# jekyll is a little dumb and resolves the lab/fonts symlink and copies
|
||||||
# all font files to _site when started. Bad jekyll.
|
# all font files to _site when started. Bad jekyll.
|
||||||
# Let's work around that.
|
# 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_ &
|
sh <<_EOF_ &
|
||||||
N=3
|
N=3
|
||||||
while [ \$N -gt 0 ]; do
|
while [ \$N -gt 0 ]; do
|
||||||
sleep 1
|
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
|
ln -fs ../../../build/fonts _site/lab/fonts
|
||||||
let N=N-1
|
let N=N-1
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Reference in a new issue