Sprawdź, czy zainstalowany jest pakiet apt-get, a następnie zainstaluj go, jeśli nie jest w systemie Linux?
Pracuję nad systemem Ubuntu i obecnie robię to:
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
Czy to właśnie zrobiłaby większość ludzi? Czy jest bardziej eleganckie rozwiązanie?