From 49cf6944f0ecf52596c552fe4cbe67528b128861 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Mon, 15 Nov 2021 18:26:33 +0100 Subject: [PATCH] Added missing file --- macos/delete_rpath.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 macos/delete_rpath.sh diff --git a/macos/delete_rpath.sh b/macos/delete_rpath.sh new file mode 100644 index 0000000..a1166e8 --- /dev/null +++ b/macos/delete_rpath.sh @@ -0,0 +1,16 @@ +#!/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)) + +install_name_tool -delete_rpath $WANTED_RPATH $EXEC \ No newline at end of file