Created
January 15, 2015 02:55
-
-
Save evands/76094e7357790c600abc to your computer and use it in GitHub Desktop.
Combine libraries of matching names but different architectures from directory $1 and directory $2 # into directory $3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Combine libraries of matching names but different architectures from directory $1 and directory $2 | |
# into directory $3. | |
# | |
# Usage: | |
# => combine_matching_static_libraries.sh DIR_INPUT_1 DIR_INPUT_2 DIR_OUTPUT | |
###### | |
pushd $1 | |
libraries=(*.a) | |
popd | |
echo "Matching up ${libraries[*]}..." | |
for library in ${libraries[*]} | |
do | |
lipo -create "${1}/${library}" "${2}/${library}" -o "${3}/${library}" | |
lipo -info "${3}/${library}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment