]> gitweb.fluxo.info Git - hydra.git/commitdiff
Install package based on command name
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 7 May 2011 02:33:10 +0000 (23:33 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 7 May 2011 02:33:10 +0000 (23:33 -0300)
lib/hydra/misc

index 62fd7f54e1b82eff4a3072eb8697181c1438ccfe..6bd0c61d8a72b15dddc37912226ee563f8aaa0ce 100644 (file)
@@ -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