mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-19 20:12:52 +02:00
29 lines
586 B
Bash
29 lines
586 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
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
|
|
done
|
|
|
|
printf "Running with options:\n%s\n" "$args"
|
|
|
|
# shellcheck disable=SC2086
|
|
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
|