Skip to content

Instantly share code, notes, and snippets.

@gmolveau
Last active July 25, 2023 14:37
Show Gist options
  • Save gmolveau/9d459a2572f467bee0e98435d4907c04 to your computer and use it in GitHub Desktop.
Save gmolveau/9d459a2572f467bee0e98435d4907c04 to your computer and use it in GitHub Desktop.
bash script - list all missing dependencies and exit
# inspiration : https://stackoverflow.com/a/52552095
deps=0
for app in awk wget; do
! command -v ${app} &> /dev/null && echo "$app is not installed" && deps=1
done
[[ $deps -ne 0 ]] && exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment