A script that gets a binary and give it's dependencies on Arch Linux using ldd.
getdepends [-i <input file path>] [-f <format output for PKGBUILD>] [-e <exclude core packages>]
core/glibc: For `ldd`
core/coreutils: For `sort`, `readlink`
extra/pkgfile: For `pkgfile`
Install from AUR:
yay -S getdepends
Code is copied from this user: edotux on stackexchange