Added more MacOS tools

This commit is contained in:
AlexandreRouma
2021-11-15 17:28:12 +01:00
parent 7ad616d62b
commit 106e0ada80
2 changed files with 28 additions and 0 deletions

14
macos/get_library_path.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/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))