File: copy_dylibs.sh

package info (click to toggle)
ferret-vis 7.6.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 218,500 kB
  • sloc: fortran: 234,502; ansic: 51,843; csh: 2,516; makefile: 1,613; sh: 1,571; pascal: 569; sed: 184; lisp: 122; awk: 26
file content (22 lines) | stat: -rw-r--r-- 631 bytes parent folder | download | duplicates (4)
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