Short shell script for speeding up getting Drupal modules
What follows is a short shell script I use for making it easier to get modules from the Drupal repository. It is best to use this script only with sources where you have a great deal of confidence in the source of the file you're downloading. Of course nothing substitutes for using good practices when it comes to deciding whether to install a program and its possible implications.
Read on for the code itself. It is a very simple script that makes it easy to copy the location of a file from a website and then download and uncompress the file. It could be much fancier but it does the trick.
if [ $# -ne 1 ]; then
echo 1>&2 Usage: dget URL
curl $1 | tar xzv
To use this script on Mac OS X copy it into a text file. You then need to set permissions to make it executable. The easiest way to do this is:
chmod a+x dget
I'll write more about it tomorrow but this script comes in handy when you need to download more than 100 modules. There certainly are some other ways of using CVS and other tools but if one wants to look at the web page for modules and read the notes on each one this is an easy way to get around some extra typing.