2020-03-05 19:40:18 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
args=""
|
|
|
|
|
2021-05-15 18:51:59 +02:00
|
|
|
# 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
|
|
|
|
|
2021-05-15 18:51:59 +02:00
|
|
|
printf "Running with options:\n%s\n" "$args"
|
|
|
|
|
|
|
|
# shellcheck disable=SC2086
|
2021-11-27 04:02:30 +02:00
|
|
|
for f in /in/*.otf /in/*.ttf /in/*.woff /in/*.eot /in/*.ttc; do [ -f "$f" ] && fontforge -script /nerd/font-patcher -out /out $args "$f"; done
|