summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-05-06 23:33:10 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-05-06 23:33:10 -0300
commita06184080bb791c5251d301f1dd3ae951e1b5e19 (patch)
treea1f332ca5354f37c38248cbdea8c0edd18872eb3
parenta25db77cf7e4255c0a9f5b95a57fbcc36b2e6f67 (diff)
downloadhydra-a06184080bb791c5251d301f1dd3ae951e1b5e19.tar.gz
hydra-a06184080bb791c5251d301f1dd3ae951e1b5e19.tar.bz2
Install package based on command name
-rw-r--r--lib/hydra/misc4
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