Skip to content

Instantly share code, notes, and snippets.

@evands
Created January 15, 2015 02:55
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save evands/76094e7357790c600abc to your computer and use it in GitHub Desktop.
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.
#!/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