Commit fcaec9d1 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: #1672: the test -f is already done in the find command

parent 0739abab
......@@ -39,8 +39,6 @@ cd "$DIRNAME_0"
OUT_DIR=$(pwd)
PATCH_ELF_EXE="$OUT_DIR/patchelf"
#do not move below block. it must be before "unset LD_LIBRARY_PATH" code
#check if we have any python bindings
if [ -f "$OUT_DIR/lib/python/_otbApplication.so" ] ; then
......@@ -56,9 +54,7 @@ BINARY_FILES=$(find "./lib" "./bin" "./plugins" -type f -exec file {} \; | grep
# run patchelf
for bin_file in $BINARY_FILES; do
#echo "adding rpath to $bin_file"
if [ -f "$bin_file" ]; then
"$PATCH_ELF_EXE" "--set-rpath" "$OUT_DIR/lib" "$bin_file"
fi
./patchelf "--set-rpath" "$OUT_DIR/lib" "$bin_file"
done
#install uninstall_otb script
......
......@@ -56,13 +56,11 @@ BIN_FILES=$(find "./bin" -type f -exec file {} \; | grep -i ": Mach-O .*executab
# run install_name_tool
for input_file in $LIB_FILES $BIN_FILES; do
#echo "adding rpath to $OUT_DIR/$lib_file"
if [ -f "$input_file" ]; then
input_file_old_rpaths=$(otool -l "$input_file" | grep -A 3 "LC_RPATH" | grep -oE 'path .* \(offset' | cut -d ' ' -f 2)
for rpath_old in $input_file_old_rpaths; do
install_name_tool "-delete_rpath" "$rpath_old" "$input_file"
done
install_name_tool "-add_rpath" "$OUT_DIR/lib" "$input_file"
fi
input_file_old_rpaths=$(otool -l "$input_file" | grep -A 3 "LC_RPATH" | grep -oE 'path .* \(offset' | cut -d ' ' -f 2)
for rpath_old in $input_file_old_rpaths; do
install_name_tool "-delete_rpath" "$rpath_old" "$input_file"
done
install_name_tool "-add_rpath" "$OUT_DIR/lib" "$input_file"
done
#install uninstall_otb script
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment