mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-19 09:51:48 +02:00
Merge pull request #626 from dgswilkins/docker
Update Dockerfile to use supported version of alpine and Python
This commit is contained in:
commit
e2106fb47c
2 changed files with 20 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM alpine:3.11
|
||||
FROM alpine:edge
|
||||
|
||||
LABEL org.opencontainers.image.title="Nerd Fonts Patcher" \
|
||||
org.opencontainers.image.description="Patches developer targeted fonts with a high number of glyphs (icons)." \
|
||||
|
@ -6,8 +6,8 @@ LABEL org.opencontainers.image.title="Nerd Fonts Patcher" \
|
|||
org.opencontainers.image.source="https://github.com/ryanoasis/nerd-fonts" \
|
||||
org.opencontainers.image.licenses="MIT"
|
||||
|
||||
RUN apk add fontforge --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing && \
|
||||
apk add --no-cache py2-pip && \
|
||||
RUN apk add --no-cache fontforge --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing && \
|
||||
apk add --no-cache py3-pip && \
|
||||
pip install configparser
|
||||
|
||||
# sys.stdout.write encoding (py)
|
||||
|
|
|
@ -1,19 +1,24 @@
|
|||
#!/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
|
||||
# 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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue