mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-26 02:48:31 +01:00
18 lines
317 B
Bash
18 lines
317 B
Bash
#!/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
|
|
WANTED_RPATH=$(get_second_arg $(otool -l $EXEC | grep $RPATH_NAME | grep path))
|
|
|
|
if [ ! -z "$WANTED_RPATH" ]; then
|
|
install_name_tool -delete_rpath $WANTED_RPATH $EXEC
|
|
fi |