{ | { | ||||
which "$1" 1> /dev/null | which "$1" 1> /dev/null | ||||
if [ "$?" -ne 0 ]; then | if [ "$?" -ne 0 ]; then | ||||
echo "Missing command: ${1}. install it." | |||||
exit 1 | |||||
echo "Warning: Missing command: ${1}. Continue? (y/n)" | |||||
read response | |||||
if [ "$response" != "y" ]; then | |||||
echo "Aborting." | |||||
exit 1 | |||||
fi | |||||
fi | fi | ||||
} | } | ||||