Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | drush_downloader.sh_.txt | 3.35 KB | KarenS |
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedAnd the file.
Comment #2
KarenS CreditAttribution: KarenS commentedOh 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.
Comment #3
greg.1.anderson CreditAttribution: greg.1.anderson commentedYa'll should also check out drubuntu.
Comment #4
moshe weitzman CreditAttribution: moshe weitzman commentedI 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)
Comment #5
KarenS CreditAttribution: KarenS commentedSo what is the recommended way to install/update drush on a Mac? That's what I was using this script for.
Comment #6
greg.1.anderson CreditAttribution: greg.1.anderson commentedI prefer to use cvs to install drush.
Comment #7
ihsanullahkhan CreditAttribution: ihsanullahkhan commentedThis 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
Comment #8
greg.1.anderson CreditAttribution: greg.1.anderson commentedShould 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.
Comment #9
greg.1.anderson CreditAttribution: greg.1.anderson commentedHere's a quick start of an updated drush install script based on pear:
You can add more "drush dl" commands to get whichever Drush extensions you want; customize to suit.
Comment #10
buddaCan't find the drush channel.xml when i try the above.
Comment #11
greg.1.anderson CreditAttribution: greg.1.anderson commentedTry the helpful hints on the Drush project page; they have been updated post-#9. Help on fixing up #9 would be appreciated.
Comment #12
greg.1.anderson CreditAttribution: greg.1.anderson commentedThis 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.