Skip to content

Commit

Permalink
Switch to find instead of ls
Browse files Browse the repository at this point in the history
  • Loading branch information
MinyazevR authored Dec 28, 2024
1 parent 6964a46 commit d179163
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions buildScripts/github/install_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,26 @@ prepare_environment_variable_and_check_tools(){

dll_search(){
cd "$LIB_DIR"
ls -l1
case "$(uname)" in
Darwin)
ls -- *.dylib | xargs otool -L | grep "not found" || exit 0
find . -name '*.dylib*' -print0 | xargs -0 -n1 otool -L | grep "not found" || exit 0
;;
Linux)
# Find dependencies that have not been packaged, but are still in the system
ls -- *.so* | xargs ldd | grep -Ev "not found$" | grep so | sed -e '/^[^\t]/ d' | sed -e 's/\t//' \
find . -namr '*.so*' -print0 | xargs -0 -nl ldd | grep -Ev "not found$" | grep so | sed -e '/^[^\t]/ d' | sed -e 's/\t//' \
| sed -e 's/.*=..//' | sed -e 's/ (0.*)//' | grep -Ev "lib(c|dl|m|pthread|rt)\.so.*" \
| grep -Ev "$LD_LIBRARY_PATH" | grep -Ev "ld|linux-vdso"
ls -- *.so* | xargs ldd | grep "not found" || exit 0

find . -name '*.so*' -print0 | xargs -0 -n1 ldd | grep "not found" || exit 0
;;
MINGW64*)
# Find dependencies that have not been packaged, but are still in the system
ls -- *.dll* | xargs ldd | grep -Ev "not found$" | grep dll | sed -e '/^[^\t]/ d' | sed -e 's/\t//' \
find . -name '*.dll*' -print0 | xargs -0 -n1 ldd | grep -Ev "not found$" | grep dll | sed -e '/^[^\t]/ d' | sed -e 's/\t//' \
| sed -e 's/.*=..//' | sed -e 's/ (0.*)//' | grep -Ev "lib(System|SYSTEM)32.*dll" \
| grep -Ev "$LD_LIBRARY_PATH"

ls -- *.dll* | xargs ldd | grep "not found" || exit 0
find . -name '*.dll*' -print0 | xargs -0 -n1 ldd | grep "not found" || exit 0
;;
*) exit 1 ;;
esac
Expand Down

0 comments on commit d179163

Please sign in to comment.