X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=graphics%2Fupdate;h=464a3a068b0b6a2cc819b7c1a5b0bf4c92d018fb;hp=f649d8df80442dd5218a18752936473a204e10a9;hb=95e6551c7e77f03455d14b41a9bc0430c9dc086d;hpb=94aadbd62c259a73d7511522dd167d519c68c5f9 diff --git a/graphics/update b/graphics/update index f649d8df8..464a3a068 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,27 @@ # 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() +{ + set +e + check=$(fc-list | grep "$1") + set -e + 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,15 +34,16 @@ 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 + INKSCAPE="$HOME/Applications/inkscape" + for c in icotool convert inkbatch $INKSCAPE; do if [ ! -x "$(command -v $c)" ]; then echo "$c is required" exit 1 fi done - INKSCAPE="inkscape -C --export-type=png" # OS X application icons mkdir -p osx