diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-03-05 16:13:28 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-03-05 16:13:28 +0000 |
commit | 498ad0970d242a3ae2d0917f8e603edaaf1ea0ac (patch) | |
tree | b2895382322c2e19812ac312ff16856a337fc421 /scripts/drupal.sh | |
parent | bfa5d45db8fbfab492cc89fea801900468d11e92 (diff) | |
download | brdo-498ad0970d242a3ae2d0917f8e603edaaf1ea0ac.tar.gz brdo-498ad0970d242a3ae2d0917f8e603edaaf1ea0ac.tar.bz2 |
- Patch #59863 by sun: clarified how to use drupal.sh.
Diffstat (limited to 'scripts/drupal.sh')
-rwxr-xr-x | scripts/drupal.sh | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/scripts/drupal.sh b/scripts/drupal.sh index 0ed781f83..a82f61bc3 100755 --- a/scripts/drupal.sh +++ b/scripts/drupal.sh @@ -12,15 +12,15 @@ * @param path Drupal's absolute root directory in local file system (optional). * @param URI A URI to execute, including HTTP protocol prefix. */ -$script = array_shift($_SERVER['argv']); +$script = basename(array_shift($_SERVER['argv'])); if (in_array('--help', $_SERVER['argv'])) { echo <<<EOF Execute a Drupal page from the shell. -Usage: {$script} [OPTIONS] "<URI>" -Example: {$script} "http://mysite.org/node" +Usage: {$script} [OPTIONS] "<URI>" +Example: {$script} "http://mysite.org/node" All arguments are long options. @@ -29,9 +29,8 @@ All arguments are long options. --root Set the working directory for the script to the specified path. To execute Drupal this has to be the root directory of your Drupal installation, f.e. /home/www/foo/drupal (assuming Drupal - running on Unix). Current directory is not required. Use - surrounding quotation marks on Windows. - + running on Unix). Current directory is not required. + Use surrounding quotation marks on Windows. --verbose This option displays the options as they are set, but will produce errors from setting the session. @@ -47,6 +46,12 @@ All arguments are long options. and bar/foo.php exists, this script will be executed without bootstrapping Drupal. To execute Drupal's cron.php, specify http://default/cron.php as the URI. + + +To run this script without --root argument invoke it from the root directory +of your Drupal installation with + + ./scripts/{$script} \n EOF; exit; |