Starting with the code at http://drupal.org/node/793174, I have been working on a Drush install script. This is partly to make it easier to install Drush for the first time, but also to provide an easy way to update it with the latest version periodically. Here's what I have so far. It could certainly use work and others may have better ideas, but I thought I'd post it here for discussion. It obviously needs to be renamed to remove the .txt extension.

CommentFileSizeAuthor
#1 drush_downloader.sh_.txt3.35 KBKarenS
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KarenS’s picture

FileSize
3.35 KB

And the file.

KarenS’s picture

Oh yeah, I included things like Provision and Module Builder, which maybe should be removed. I was trying to grab lots of Drush modules in the same way to see how it could work.

greg.1.anderson’s picture

Ya'll should also check out drubuntu.

moshe weitzman’s picture

Title: Drush Install Script » Drush Install Script - team based drush
Status: Needs work » Active

I don't think that we will do anything with this script as a whole. But parts of it do suggest TODOs

1. We should document better how to setup drush for a team to use (put it in /usr/share/drush)
2. We should encourage package maintainers to stay up to date so that we can just recommend apt-get drush and friends
3. README suggests putting custom commands in /usr/share/drush/commands but thats inside of drush itself if you install to /usr/share. We should look for drushrc files in /usr/share/drush/.drush (see end of script)

KarenS’s picture

So what is the recommended way to install/update drush on a Mac? That's what I was using this script for.

greg.1.anderson’s picture

I prefer to use cvs to install drush.

ihsanullahkhan’s picture

This method of installation work successfully for me.

Find the download URL of the recommended release from the Drush project page and download with WGET
cd ~/
wget http://ftp.drupal.org/files/projects/drush-All-versions-3.0.tar.gz

Extract the archive
tar -xvzf drush-All-versions-3.0.tar.gz

Set up an Alias
Create an alias for Drush in .bash_profile (this can also go in .profile or .bash_aliases)

echo "alias drush='php ~/drush/drush.php'" >> ~/.bash_profile

Optionally, specify a PHP path (version 5.2 or greater required)

echo "alias drush='/usr/local/php5/bin/php ~/drush/drush.php'" >> ~/.bash_profile

Load aliases[1] (or reconnect)

source .bash_profile

greg.1.anderson’s picture

Component: Code » PM (dl, en, up ...)

Should we change the search path for global commands from /usr/share/drush to /usr/share/drush/.drush, as suggested a while back above, or can we perhaps deprecate this script & install location in favor of installation via pear, and keep global commands at /usr/share/drush? The pear installer puts drush at /usr/share/php/drush, so I think it is fine to close this without action.

greg.1.anderson’s picture

Here's a quick start of an updated drush install script based on pear:

sudo apt-get update
sudo apt-get install php-pear
sudo pear upgrade
sudo pear install Console_Table
sudo pear channel-discover pear.drush.org
sudo pear install drush/drush
sudo mkdir -p /usr/share/drush/commands
sudo drush -y dl provision

You can add more "drush dl" commands to get whichever Drush extensions you want; customize to suit.

budda’s picture

Can't find the drush channel.xml when i try the above.

admin@www1:~$ sudo pear channel-discover pear.drush.org
Discovery of channel "pear.drush.org" failed (channel-add: Cannot open "http://pear.drush.org/channel.xml" (File http://pear.drush.org:80/channel.xml not valid (received: HTTP/1.1 404 Not Found
)))
greg.1.anderson’s picture

Try the helpful hints on the Drush project page; they have been updated post-#9. Help on fixing up #9 would be appreciated.

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.