nerd-fonts/bin/scripts/docker-entrypoint.sh
Dani Llewellyn e85d9330d5 Update docker-entrypoint.sh
* Add quotes around the variable containing the detected file name in `/in` to allow for spaces in the file names.
2021-08-19 00:04:13 +01:00

19 lines
445 B
Bash

#!/bin/sh
skip=false
args=""
# Discard --out option
for i; do
[ "${i}" != "${i% *}" ] && i="\"$i\""
if [ "$i" = "--out" ] || [ "$i" = "-o" ]; then
skip=true
else
if [ "$skip" = false ] || [ "$i" == "-*" ]; then
args="$args $i"
fi
skip=false
fi
done
for f in /in/*.otf /in/*.ttf /in/*.woff /in/*.eot; do [ -f "$f" ] && fontforge -script /nerd/font-patcher -out /out $args "$f"; done