function checkk { which $1 > /dev/null 2>&1 if [ "$?" -gt 0 ]; then dbg $dbg_error "The dependency '$1' seems to be missing." dbg $dbg_error "Please install your corresponding OS package and try again" exit 1 fi } exec=(systemctl clang git rustup gcc cmake pip python3 psql postgres) for e in ${exec[@]}; do dbg $dbg_trace "Checking for dependency $e" checkk $e done