X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=graphics%2Fupdate;h=0628a7c8b4ce5ee1a79d8528dd8c505412ec1176;hb=b73f5cfeec25f08770b339081c7e1ea22c48dec6;hp=f649d8df80442dd5218a18752936473a204e10a9;hpb=94aadbd62c259a73d7511522dd167d519c68c5f9;p=dcpomatic.git diff --git a/graphics/update b/graphics/update index f649d8df8..0628a7c8b 100755 --- a/graphics/update +++ b/graphics/update @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # # Update generated stuff in graphics/ from the source files. # @@ -6,13 +6,25 @@ # a) getting the wscript right is a complete pain in the arse # b) running Inkscape from the command line on OS X is a complete pain in the arse +set -e + pwd=`pwd` if [ `basename $pwd` != "graphics" ]; then echo "$0: run within graphics/" exit 1 fi -svg_apps="dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch dcpomatic2_player dcpomatic2_playlist dcpomatic2_disk" +function required_font() +{ + check=$(fc-list | grep "$1") + if [ "$check" == "" ]; then + echo "Missing font $1" + exit 1 + fi +} + +svg_apps="dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch dcpomatic2_player dcpomatic2_playlist dcpomatic2_disk dcpomatic2_combiner" + if [ `uname -s` == "Darwin" ]; then # Convert OS X icons using OS X-only iconutil @@ -20,6 +32,7 @@ if [ `uname -s` == "Darwin" ]; then iconutil --convert icns --output osx/$p.icns osx/$p.iconset done else + required_font "Libre Baskerville" for c in icotool convert inkscape inkbatch; do if [ ! -x "$(command -v $c)" ]; then