File: macfix.sh

package info (click to toggle)
stellarium 25.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,307,224 kB
  • sloc: ansic: 317,377; cpp: 214,435; xml: 48,592; javascript: 26,073; python: 2,113; perl: 734; sh: 247; makefile: 192; pascal: 169
file content (23 lines) | stat: -rwxr-xr-x 672 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

BIN_FILE=Stellarium.app/Contents/MacOS/stellarium
for P in $(otool -L $BIN_FILE | awk '{print $1}')
do 
    if [[ "$P" == *@rpath* ]] 
    then 
        QTFWPATH=$(echo $P | sed 's,@rpath,@executable_path/../Frameworks,g')
        install_name_tool -change $P $QTFWPATH $BIN_FILE
    fi 
done 

MD4C_FILE=Stellarium.app/Contents/Frameworks/libmd4c-html.0.dylib
if [ -f $MD4C_FILE ]; then
    for L in $(otool -L $MD4C_FILE | awk '{print $1}')
    do
        if [[ "$L" == *@rpath* ]]
        then
            FWPATH=$(echo $L | sed 's,@rpath,@executable_path/../Frameworks,g')
            install_name_tool -change $L $FWPATH $MD4C_FILE
        fi
    done
fi