Attempt to resolve symlinks

This commit is contained in:
ghorsington committed 2021-07-20 11:21:40 +03:00
1 parent 8c7dcf265c
commit b2b0e5b5ed
1 file changed
+13
+13
View File
@@ -87,6 +87,19 @@ if [ -n "$1" ]; then
esac
fi
# Resolve any symlinks
case $os_type in
Linux*)
executable_path=`readlink -f "${executable_path}"`
;;
Darwin*)
# On macOS there is no easy way to resolve readlinks fully. This is the best we can do.
executable_path=`readlink "${executable_path}"`
;;
esac
echo "$executable_path"
executable_type=`LD_PRELOAD="" file -b "${executable_path}"`;
case $executable_type in