How to install a module from an archive file with drush?
You can use drush make to unpack a module named your_module from an archive file, as follows:


Create a modulename.make file containing:

core = 7.x
api = 2
; Install from local module archive file.
projects[your_module][type] = "module"
projects[your_module][download][type] = "file"
projects[your_module][download][url] = "file:///dir/your_module.tar.gz"

While in the Drupal root directory of your site, execute the Makefile and enable your module:

drush make --no-core -y your_module.make &amp;&amp; drush en -y your_module



Alternatively, you can script this into one set of commands, using a temporary file instead of a separate Makefile. Again, to be executed while in the Drupal root directory:

#!/bin/bash
module="your_module"
makefile=$(mktemp)
echo "Created temp file $makefile"
cat &lt;&lt; end-of-makefile &gt;$makefile
  core = 7.x
  api = 2
  projects[$module][type] = "module"
  projects[$module][download][type] = "file"
  projects[$module][download][url] = "file:///dir/file.tar.gz"
end-of-makefile
drush make --no-core -y --verbose $makefile
drush en -y $module


(Bash named pipes or bash process substitution via &lt;(echo …) cannot be used here to avoid a temp file. They create streams, which are non-seekable files that drush make fails to read from.)