summaryrefslogtreecommitdiff
path: root/pkg/osx/cp-with-libs
diff options
context:
space:
mode:
authorSimon Howard2010-01-04 22:45:45 +0000
committerSimon Howard2010-01-04 22:45:45 +0000
commitc401e515b0bbe734fc39517a4d25c96ce487bef4 (patch)
tree00d078eb17f35b9b3442a0c75e2cda3dafaec327 /pkg/osx/cp-with-libs
parentdfff86ebefb6044183022016da67c7cae691b973 (diff)
downloadchocolate-doom-c401e515b0bbe734fc39517a4d25c96ce487bef4.tar.gz
chocolate-doom-c401e515b0bbe734fc39517a4d25c96ce487bef4.tar.bz2
chocolate-doom-c401e515b0bbe734fc39517a4d25c96ce487bef4.zip
Copy binaries into app dir along with libraries.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1788
Diffstat (limited to 'pkg/osx/cp-with-libs')
-rwxr-xr-xpkg/osx/cp-with-libs16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/osx/cp-with-libs b/pkg/osx/cp-with-libs
new file mode 100755
index 00000000..902ae079
--- /dev/null
+++ b/pkg/osx/cp-with-libs
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Copy a program to the specified destination, along
+# with SDL libraries it depends upon.
+
+BINARY=$1
+DEST=$2
+
+cp "$BINARY" "$DEST"
+
+# Copy libraries; only those with libSDL in the name
+
+otool -L "$BINARY" | grep libSDL | sed 's/^.//; s/(.*//' | while read; do
+ cp "$REPLY" "$DEST"
+done
+