1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
nerd-fonts/bin/scripts/docker-entrypoint.sh

29 lines
586 B
Bash
Raw Normal View History

2020-03-05 19:40:18 +02:00
#!/bin/sh
set -e
2020-03-05 19:40:18 +02:00
args=""
# check all args for --out or -o
while [ "$#" -gt 0 ]; do
if [ "$1" = "-out" ] || [ "$1" = "--outputdir" ];then
# move past the option
shift
# and the value if there is one
case "$1" in
-*) continue ;;
*) shift $(( $# > 0 ? 1 : 0 )) ;;
esac
continue
fi
args="$args $1"
shift
2020-03-05 19:40:18 +02:00
done
printf "Running with options:\n%s\n" "$args"
# shellcheck disable=SC2086
2024-02-04 18:54:58 +02:00
find /in -type f \( -name "*.otf" -o -name "*.ttf" -o -name "*.woff" -o -name "*.eot" -o -name "*.ttc" \) | parallel fontforge -script /nerd/font-patcher -out /out $args {}
exit 0