[sword-svn] r3667 - trunk/bindings/cordova
scribe at crosswire.org
scribe at crosswire.org
Thu Jun 27 08:06:54 MST 2019
Author: scribe
Date: 2019-06-27 08:06:54 -0700 (Thu, 27 Jun 2019)
New Revision: 3667
Added:
trunk/bindings/cordova/libstrip.sh
Log:
added utility to stop apple libraries
Added: trunk/bindings/cordova/libstrip.sh
===================================================================
--- trunk/bindings/cordova/libstrip.sh (rev 0)
+++ trunk/bindings/cordova/libstrip.sh 2019-06-27 15:06:54 UTC (rev 3667)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+#
+## Strip debug symbol from universal static libraries
+#
+
+if [ -z "$1" ]
+then
+ echo "$0 library"
+ exit 1
+fi
+
+file "$1"|grep 'universal' >/dev/null 2>&1
+if [ $? -ne 0 ]
+then
+ echo "$1: not a static library"
+ exit 1
+fi
+
+TMP=`mktemp -d /tmp/tmp.XXXXXX`
+
+for arch in `file "$1"|grep 'architecture '|sed 's/.*(for architecture \(.*\)).*/\1/'`
+do
+ lipo "$1" -thin $arch -output $TMP/libfoo-$arch-unstripped.a
+ strip -S -x -o $TMP/libfoo-$arch.a -r $TMP/libfoo-$arch-unstripped.a
+done
+
+rm -f $TMP/*-unstripped.a
+
+lipo -create -output "$1-stripped" $TMP/*.a
+
+rm -f $TMP/*.a
+rmdir $TMP
Property changes on: trunk/bindings/cordova/libstrip.sh
___________________________________________________________________
Added: svn:executable
+ *
More information about the sword-cvs
mailing list