drush

Авторы решений:
Версия Drupal:
Категории модулей:
Разработчики модуля:

Описание модуля

Полное название: Drush
Проект начат: November 13, 2006



Описание с сайта

drush - это оболочка командной строки и Unix скриртовый интерфейс для Друпал, настоящий швейцарский армейский нож предназначенный для того, чтобы облегчить жизнь для тех из нас, кто тратит большую часть своего рабочего времени хакерствуя в командной строке.

The drush.module for Drupal 5 itself now only provides an API that allows other modules expose command line functionality in an easy way.

Also included are several modules that make use of the drush API:

drush_pm.module: The drush Package Manager: This module allows you to install modules from the command line in a very simple way (apt-get style) - just type e.g. drush pm install views in a Drupal directory to install the Views project!
Additionally, the Drush Packet Manager also allows you to update all your modules with just one command - drush pm update.

drush_tools.module: The drush Toolbox: several useful utilities for site administrators and developers (e.g. drush cron or drush cache clear)
The drush_sql module helps you issue queries to any of your databases (i.e. is multi-site aware) and even helps you migrate databases between your environments.
The drush_simpletest module is a fast and easy way to run simpletest tests from the command line.

Be sure to read the accompanying README.txt for installation and usage instructions.

More contributions both in the form of new commands for the drush_tools.module and new modules that make use of the drush API are greatly welcome!

Windows support is experimental.

"drush" - это сокращение от Drupal Shell.

Зависит от:

Update Status (5.x-2.0 или выше).

Настройка

Установка

------------

For Linux/Unix/Mac:

1. Untar the tarball into your module directory (sites/all/modules)
2. Enable drush.module and any submodules you want to use. You must enable the CVS or wget modules
if you want to install modules (you do).
3. (optional, but recommended:) To ease the use of drush,
- create a link to drush.php in a directory that is in your $PATH, e.g.:
$ ln /path/to/drush.php /usr/bin/drush
OR
- create an alias to drush.php:
$ alias drush='php modules/drush/drush.php'
(this goes into .profile or .bash_aliases in your home folder)

4. Start using drush by running "drush" from your Drupal root directory.

(or, if you did not follow step 3, by running "./sites/all/modules/drush.php"
or navigating to sites/all/modules/drush and running "./drush.php" )

If you have troubles, try using the -l and -r flags when invoking drush.php. See below.

For Windows (experimental!):

- Follow steps 1 and 2. Use drush by navigating to sites/all/modules/drush
and running 'drush.bat'.
- Whenever the documentation or the help text refers to
'drush [option] ' or something similar, 'drush' has to be replaced
by 'drush.bat'.
- If drush.bat is not working for you, either add the directory in which your
php.exe resides to your PATH or edit drush.bat to point to your php.exe.

USAGE

-----
Once installed and setup (see above), you can use drush as follows while in
any Drupal directory:

  $ drush [options] <command> <command> ...

Use the 'help' command to get a list of available options and commands:

  $ drush help

Please note that drush requires a working drupal setup in order to function
correctly. So for multisite installations, you might need to use the -l or other command line
options just to get the help command to work:

Related Options:

  • -r
    , --root=
    Drupal root directory to use (default: current directory)
  • -l , --uri= URI of the drupal site to use (only needed in multisite environments)
  • -v, --verbose Display all available output

If you get tired of typing options all the time, you can add them to your drush.php alias or create a drushrc.php file. These provide additional options for your drush call. They provide great flexibility for a multi-site installation, for example. See example.drushrc.php.

Требования

Эта версия drush разработата для Drupal 6.x, которые выполняется на платформе Unix/Linux.

  • Для того, чтобы использовать drush из командной строки, вам нужен бинарник PHP совместимый с CLI-режимом. Минимально требовуемая версия PHP: 4.3.0 (PHP 5.x тоже подойдёт).
  • drush может также работаь и в Windows, however, drush modules might make use of unix command line tools, so to use it effectively, you have to install some of them, e.g. from GnuWin32 (http://gnuwin32.sourceforge.net/). The READMEs of the individual modules should state which binaries are required.

Ограничения

Из-за того, что модуль использует tokenizer PHP, drush может не работать правильно, если
PHP-код ядра Друпал зашифрован (encrypted) (дополнительная информация в API.txt).

Использованные материалы

Полезные ссылки

Creative Commons: ­Attribution-Share Alike 2.5

Данные материалы выложены под лицензией Creative Commons: ­Attribution-Share Alike 2.5. Это значит, что вы можете распространять, копировать и модифицировать эти произведения при условии упоминания авторства оригинала, и при условии, что они также будут распространяться на условиях этой лицензии (то есть, изменённую работу нельзя защитить копирайтом). Подробнее смотри: http://ru.wikipedia.org/wiki/Creative_Commons