Added more MacOS tools

pull/521/head
AlexandreRouma 2021-11-15 17:28:12 +01:00
rodzic 7ad616d62b
commit 106e0ada80
2 zmienionych plików z 28 dodań i 0 usunięć

Wyświetl plik

@ -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))

Wyświetl plik

@ -0,0 +1,14 @@
#!/bin/sh
set -e
# Options
RPATH_NAME=$1
EXEC=$2
# Function to keep only the second arg
get_second_arg() {
echo $2
}
# Get current rpath
echo $(get_second_arg $(otool -l $EXEC | grep $RPATH_NAME | grep path))