diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-05-06 23:33:10 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-05-06 23:33:10 -0300 |
commit | a06184080bb791c5251d301f1dd3ae951e1b5e19 (patch) | |
tree | a1f332ca5354f37c38248cbdea8c0edd18872eb3 /lib/hydra | |
parent | a25db77cf7e4255c0a9f5b95a57fbcc36b2e6f67 (diff) | |
download | hydra-a06184080bb791c5251d301f1dd3ae951e1b5e19.tar.gz hydra-a06184080bb791c5251d301f1dd3ae951e1b5e19.tar.bz2 |
Install package based on command name
Diffstat (limited to 'lib/hydra')
-rw-r--r-- | lib/hydra/misc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hydra/misc b/lib/hydra/misc index 62fd7f5..6bd0c61 100644 --- a/lib/hydra/misc +++ b/lib/hydra/misc @@ -25,13 +25,13 @@ function hydra_user_input { fi } -# Install a package. +# Install a package based on command name. function hydra_install_package { if [ -z "$1" ]; then return fi - dpkg -l $1 &> /dev/null + which $1 &> /dev/null if [ "$?" == "1" ]; then apt-get install $1 -y |