| 1 |
// $Id: README.txt,v 1.14 2008/02/11 20:57:24 weitzman Exp $ |
// $Id: README.txt,v 1.15 2008/03/26 03:03:56 weitzman Exp $ |
| 2 |
|
|
| 3 |
DESCRIPTION |
DESCRIPTION |
| 4 |
----------- |
----------- |
| 9 |
Green text against a black background is optional. Perhaps you would like |
Green text against a black background is optional. Perhaps you would like |
| 10 |
some alpha-channel translucency with that? ;) |
some alpha-channel translucency with that? ;) |
| 11 |
|
|
| 12 |
drush.module itself doesn't provide any actual tools or commands but the API |
drush.php itself doesn't provide any actual tools or commands but the API |
| 13 |
for those. There are several modules that provide drush utilities included in |
for those. There are several command files that provide drush utilities |
| 14 |
this download. See Package Manager, SQL Tools, and Toolbox. |
included in this download. See Package Manager, SQL Tools, and Toolbox. |
| 15 |
|
|
| 16 |
INSTALLATION |
INSTALLATION |
| 17 |
------------ |
------------ |
| 18 |
For Linux/Unix/Mac: |
For Linux/Unix/Mac: |
| 19 |
1. Untar the tarball into your module directory (sites/all/modules) |
1. Untar the tarball into a convenient folder (/path/to/drush) |
| 20 |
2. Enable drush.module and any submodules you want to use. You must enable the CVS or wget modules |
2. (optional, but recommended:) To ease the use of drush, |
|
if you want to install modules (you do). |
|
|
3. (optional, but recommended:) To ease the use of drush, |
|
| 21 |
- create a link to drush.php in a directory that is in your $PATH, e.g.: |
- create a link to drush.php in a directory that is in your $PATH, e.g.: |
| 22 |
$ ln /path/to/drush.php /usr/bin/drush |
$ ln /path/to/drush/drush.php /usr/bin/drush |
| 23 |
OR |
OR |
| 24 |
- create an alias to drush.php: |
- create an alias to drush.php: |
| 25 |
$ alias drush='php modules/drush/drush.php' |
$ alias drush='php /path/to/drush/drush.php' |
| 26 |
(this goes into .profile or .bash_aliases in your home folder) |
(this goes into .profile or .bash_aliases in your home folder) |
| 27 |
|
|
| 28 |
4. Start using drush by running "drush" from your Drupal root directory. |
3. Start using drush by running "drush" from your Drupal root directory. |
| 29 |
|
|
| 30 |
|
(or, if you did not follow step 3, by running "/path/to/drush/drush.php" |
| 31 |
|
or navigating to /path/to/drush and running "./drush.php" ) |
| 32 |
|
|
|
(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" ) |
|
|
|
|
| 33 |
If you have troubles, try using the -l and -r flags when invoking drush.php. See below. |
If you have troubles, try using the -l and -r flags when invoking drush.php. See below. |
| 34 |
|
|
| 35 |
For Windows (experimental!): |
For Windows (experimental!): |
| 36 |
- Follow steps 1 and 2. Use drush by navigating to sites/all/modules/drush |
- Follow step 1. Use drush by navigating to /path/to/drush |
| 37 |
and running 'drush.bat'. |
and running 'drush.bat'. |
| 38 |
- Whenever the documentation or the help text refers to |
- Whenever the documentation or the help text refers to |
| 39 |
'drush [option] <command>' or something similar, 'drush' has to be replaced |
'drush [option] <command>' or something similar, 'drush' has to be replaced |
| 52 |
|
|
| 53 |
$ drush help |
$ drush help |
| 54 |
|
|
| 55 |
Please note that drush requires a working drupal setup in order to function |
For multisite installations, you might need to use the -l or other command line |
| 56 |
correctly. So for multisite installations, you might need to use the -l or other command line |
options just to get drush to work: |
|
options just to get the help command to work: |
|
| 57 |
|
|
| 58 |
$ drush -l http://association.drupal.org/drupal help |
$ drush -l http://association.drupal.org/drupal help |
| 59 |
|
|
| 60 |
Related Options: |
Related Options: |
| 61 |
-r <path>, --root=<path> Drupal root directory to use (default: current directory) |
-r <path>, --root=<path> Drupal root directory to use |
| 62 |
-l <uri> , --uri=<uri> URI of the drupal site to use (only needed in multisite environments) |
(default: current directory or anywhere in a Drupal directory tree) |
| 63 |
|
-l <uri> , --uri=<uri> URI of the drupal site to use |
| 64 |
|
(only needed in multisite environments) |
| 65 |
-v, --verbose Display all available output |
-v, --verbose Display all available output |
| 66 |
|
|
| 67 |
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. |
Other options: |
| 68 |
|
-i <path>, --include=<path> Path to folder(s) containing additional drush command files. |
| 69 |
|
Follows the POSIX convention of separating paths with a ':' |
| 70 |
|
|
| 71 |
|
If you get tired of typing options all the time, you can add them to your drush.php alias or |
| 72 |
|
create a drushrc.php file. These provide additional options for your drush call. They provide |
| 73 |
|
great flexibility for a multi-site installation, for example. See example.drushrc.php. |
| 74 |
|
|
| 75 |
|
COMMANDS |
| 76 |
|
-------- |
| 77 |
|
Drush ships with a number of commands (see above), but you can easily write |
| 78 |
|
your own. In fact, writing a drush command is no harder that writing simple |
| 79 |
|
Drupal extensions, since drush command files closely follows the structure of |
| 80 |
|
ordinary Drupal modules. |
| 81 |
|
|
| 82 |
|
See example.drush.inc for details on the internals of a drush command |
| 83 |
|
file. |
| 84 |
|
|
| 85 |
|
You can put your drush command file in a number of places: |
| 86 |
|
|
| 87 |
|
- In a .drush folder in your HOME folder. Note, that you have |
| 88 |
|
to make the .drush folder yourself. |
| 89 |
|
- Along with one of your existing modules. If your command is |
| 90 |
|
related to an existing module, this is the preferred option. |
| 91 |
|
- In a folder specified with the include option (see above). |
| 92 |
|
- In /path/to/drush/commands (not a Smart Thing, but it would work). |
| 93 |
|
|
| 94 |
|
In any case, it is important that you append it with ".drush.inc", so |
| 95 |
|
that drush can find it. |
| 96 |
|
|
| 97 |
REQUIREMENTS |
REQUIREMENTS |
| 98 |
------------ |
------------ |
| 104 |
* drush should also run on Windows, however, drush modules might make use of |
* drush should also run on Windows, however, drush modules might make use of |
| 105 |
unix command line tools, so to use it effectively, you have to install |
unix command line tools, so to use it effectively, you have to install |
| 106 |
some of them, e.g. from GnuWin32 (http://gnuwin32.sourceforge.net/). |
some of them, e.g. from GnuWin32 (http://gnuwin32.sourceforge.net/). |
| 107 |
The READMEs of the individual modules should state which binaries are required. |
The READMEs of the individual command files should state which binaries |
| 108 |
|
are required. |
| 109 |
|
|
| 110 |
FAQ |
FAQ |
| 111 |
--- |
--- |