Drush one liner
I've been playing around with node.js a bit lately and ran across their package manager. Sure it's not as powerful as drush but it's got a really nice and simple install and it got me thinking of the steps required to install drush. Sure there aren't many (Download Drush. Make sure it gets to the right dir. Make sure you add the link or aliases so you can call it easily) and you can even use git to do it. I was looking around to see if there were any easy Drush installers already out there, and low and behold there was a very nice one right here https://gist.github.com/394177.
Looking through that and getting to the install instructions, I felt it was quite a lot to remember.
curl -s -o installer.sh http://gist.github.com/raw/394177/c1cab6e589207c902a72f5c73122b6dfe065128c/Drush%20Download%20Script && chmod +x installer.sh && ./installer.sh && rm -f ./installer.shI really like that script but don't feel the need for the extra packages on all my Drush installs and would like to have a git install version as well. So I came up with the following one liner to account for some changes I wanted.
curl http://drupalcode.org/sandbox/aaronott/1120826.git/blob_plain/HEAD:/drush_install.sh | bashSure the url currently isn't all that memorable but hopefully I can get the script hanging off someplace that is. This script checks for the availability of git and if it finds it does a
git clone of drush, and if not, it downloads the tar file. It places everything in ~/.drush for safe keeping.
Now sometimes you would prefer to install drush system wide, and given the correct permissions you can do that by running this one.
curl -s http://drupalcode.org/sandbox/aaronott/1120826.git/blob_plain/HEAD:/drush_install_root.sh | sudo bashI hope you find these helpful. I've tested them on Linux (Ubuntu) and would like help testing them elsewhere. The project is currently in my sandbox at http://drupal.org/sandbox/aaronott/1120826 please let me know if you find any issues. Thanks for your help.
Post new comment