1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#! /bin/sh
# Copies the Homebrew .dylibs required to run the ferret executable to a
# dylibs subdirectory (creating it if not present) of the current directory.
if [ ! -d dylibs ]; then
if [ -e dylibs ]; then
echo "dylibs exists but is not a directory"
exit 1
fi
mkdir dylibs
fi
cd dylibs
brewprefix=`brew config | awk '/HOMEBREW_PREFIX/ {print $2}'`
if [ -n "$brewprefix" ]; then
libdir=`echo ${brewprefix}/opt/gcc/lib/gcc/*`
echo "Copying dylib libraries from ${libdir}"
for name in quadmath gcc_s ; do
echo " ${name}"
cp -f ${libdir}/lib${name}.*.dylib .
done
fi
|