I would like to know which method is the right one (better, faster, proper).
I'm writing a script that will create an entry in the xfce menu for a list of binary, only if this one is installed on the system (Linux arch based).
Should I check the binary on this way
Check if a program exists from a Bash script
Or should I check if the directory containing the file of the binary is available in /usr/share/ ?
if [ -d "$DIRECTORY" ]; then
Thanks