do some pre-checking for dependencies at setup time

This commit is contained in:
Yan 2015-05-14 17:56:48 -07:00
parent c61c2fe7ad
commit ab87e14b89
2 changed files with 11 additions and 1 deletions

View file

@ -58,6 +58,16 @@ cd $(dirname "${BASH_SOURCE[0]}")/..
case $ACTION in
setup)
if [ $(dpkg -l build-essential libtool g++ gcc | grep "^ii" | wc -l) -ne 4 ]
then
if [ "$ALLOW_SUDO" -eq 1 ]
then
sudo apt-get install build-essential libtool g++ gcc
else
echo "Please install the following packages: build-essential libtool g++ gcc"
fi
fi
echo "PATH=\"$PWD/bin:\$PATH\"" >> ~/.bashrc
;;
list)

View file

@ -1,3 +1,3 @@
#!/bin/bash
apt-get -y install build-essential texinfo
apt-get -y install texinfo