summaryrefslogtreecommitdiff
path: root/pkg/osx/cp-with-libs
blob: 902ae079344d72f6bf105727e854ee61bd6c096d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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