# Makefile FONT_DIR ?= ./css/icons PROJECT_NAME ?= projet_foo FONTELLO_HOST ?= http://fontello.com fontopen: @if test ! `which curl` ; then \ echo 'Install curl first.' >&2 ; \ exit 128 ; \ fi curl --silent --show-error --fail --output .fontello \ --form "config=@${FONT_DIR}/config.json" \ ${FONTELLO_HOST} x-www-browser ${FONTELLO_HOST}/`cat .fontello` fontsave: @if test ! `which unzip` ; then \ echo 'Install unzip first.' >&2 ; \ exit 128 ; \ fi @if test ! -e .fontello ; then \ echo 'Run `make fontopen` first.' >&2 ; \ exit 128 ; \ fi rm -rf .fontello.src .fontello.zip curl --silent --show-error --fail --output .fontello.zip \ ${FONTELLO_HOST}/`cat .fontello`/get unzip .fontello.zip -d .fontello.src rm -rf ${FONT_DIR}/* mv `find ./.fontello.src -maxdepth 3 \( -name "config.json" -o -name "*.woff" -o -name "*.ttf" -o -name "*.svg" -o -name "*.eot" \) ` ${FONT_DIR} mv `find ./.fontello.src -maxdepth 3 -name "${PROJECT_NAME}-codes.css"` ${FONT_DIR}/codes.scss rm -rf .fontello.src .fontello.zip