SDRPlusPlus/macos/get_library_path.sh

14 lines
227 B
Bash
Raw Normal View History

2021-11-15 17:28:12 +01:00
#!/bin/sh
set -e
# Options
WANTED_LIB=$1
EXEC=$2
# Function to extract the first element of a space seperated list
get_first_arg() {
echo $1
}
# Get current path
echo $(get_first_arg $(otool -L $EXEC | grep $WANTED_LIB))