I'm working on a Ubuntu system and currently this is what I'm doing:
if ! which command > /dev/null; then
echo -e "Command not found! Install? (y/n) c"
read
if "$REPLY" = "y"; then
sudo apt-get install command
fi
fi
Is this what most people would do? Or is there a more elegant solution?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…