Fix checking for inkscape binary.
[dcpomatic.git] / graphics / update
index 5fc7aa519bf35b64968520e8b6d81e88e5744f71..464a3a068b0b6a2cc819b7c1a5b0bf4c92d018fb 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -e
 #
 # Update generated stuff in graphics/ from the source files.
 #
@@ -6,6 +6,8 @@
 # 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/"
@@ -14,15 +16,16 @@ fi
 
 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"
-required_font "Libre Baskerville"
+svg_apps="dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch dcpomatic2_player dcpomatic2_playlist dcpomatic2_disk dcpomatic2_combiner"
 
 
 if [ `uname -s` == "Darwin" ]; then
@@ -31,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