check python, replace which with type -p

This commit is contained in:
AJ ONeal 2017-05-25 11:24:37 -06:00
rodič ae72817e43
revize 6fb08fe2af
1 změnil soubory, kde provedl 3 přidání a 3 odebrání

Zobrazit soubor

@ -29,8 +29,8 @@ sudo bash -c "apt-get update -qq -y < /dev/null" > /dev/null
#fi
# git, wget, curl, build-essential
if [ -z "$(which pkg-config | grep pkg-config)" ] || [ -z "$(which git | grep git)" ] || [ -z "$(which wget | grep wget)" ] || [ -z "$(which curl | grep curl)" ] || [ -z "$(which gcc | grep gcc)" ] || [ -z "$(which rsync | grep rsync)" ]
if [ -z "$(type -p pkg-config)" ] || [ -z "$(type -p git)" ] || [ -z "$(type -p wget)" ] || [ -z "$(type -p curl)" ] || [ -z "$(type -p gcc)" ] || [ -z "$(type -p rsync)" || [ -z "$(type -p python)" ]
then
echo "installing git, wget, curl, build-essential, rsync, pkg-config..."
sudo bash -c "apt-get install -qq -y git wget curl build-essential rsync pkg-config < /dev/null" > /dev/null 2>/dev/null
echo "installing git, wget, curl, build-essential, rsync, pkg-config, python..."
sudo bash -c "apt-get install -qq -y git wget curl build-essential rsync pkg-config python < /dev/null" > /dev/null 2>/dev/null
fi