summaryrefslogtreecommitdiff
path: root/frontends/cocoa/compile-xib.sh
diff options
context:
space:
mode:
authorSven Weidauer <sven@5sw.de>2017-06-01 20:11:38 +0200
committerSven Weidauer <sven@5sw.de>2017-06-05 10:51:18 +0200
commit6b2425b375ee2e9ae0cd50d94493efb2256ebd80 (patch)
tree6a3a498960723a9c7e5d1b334c648ec6699f5d3d /frontends/cocoa/compile-xib.sh
parentf855774e1a479941f3cdea919a3e9c4de14dbe6a (diff)
downloadnetsurf-6b2425b375ee2e9ae0cd50d94493efb2256ebd80.tar.gz
netsurf-6b2425b375ee2e9ae0cd50d94493efb2256ebd80.tar.bz2
Revert "remove cocoa frontend"
This reverts commit d6c07925417eaea27c85996bc243f93e27b1bcd0.
Diffstat (limited to 'frontends/cocoa/compile-xib.sh')
-rwxr-xr-xfrontends/cocoa/compile-xib.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/frontends/cocoa/compile-xib.sh b/frontends/cocoa/compile-xib.sh
new file mode 100755
index 000000000..576f9bfd0
--- /dev/null
+++ b/frontends/cocoa/compile-xib.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# call: compile-xib.sh [xib file] [language] [(optional output nib file)]
+DIR=`dirname "$1"`
+XIB=`basename -s .xib "$1"`
+
+STRINGS_FILE="$DIR/$2.lproj/$XIB.xib.strings"
+TRANSLATE=""
+if [ -f $STRINGS_FILE ]
+then
+ TRANSLATE="--strings-file $STRINGS_FILE"
+fi
+
+OUTPUT="$2.$XIB.nib"
+
+if [ "x$3" != "x" ]
+then
+ OUTPUT="$3"
+fi
+
+exec /usr/bin/ibtool $TRANSLATE --compile $OUTPUT $1