Sometimes staying on top of the latest version of WordPress can be quite annoying when your testing things locally or rolling out regular wordpress sites. I normally install with .svn but this is a neat little bash script function I threw together to grab the latest version of WordPress and unzip into the current directory through Mac OS X Terminal command.
If you’ve always wondered if it would be cool to be able to type your own custom command into mac terminal and have it do whatever wonderful command thing, you can conjure up in your wonderfully creative head.
Then i’m afraid to say it’s just not possible…ha…only kidding…keep reading if you want to find out how, it’s actually really quite simple.
So to setup these ultra cool, simple shortcut commands for your mac terminal you need to locate or create a .profile file.
If you have one already you’ll be able to find it using the following commands.
This either will or won’t reveal a .profile file. If it doesn’t, no sweat, we’ll just go ahead and create it.
(note i’m using Textmate here, you could use vim / nano or whatever gui takes your fancy.)
Once you’ve got this file open we’re going to use alias to define our shortcuts.
Here’s an example.
alias davetest="cd /Applications/MAMP/htdocs/davetestsite/"
Save the file, relaunch terminal and type “davetest” or whatever your shortcut is and wollah you’ll have created your very own customised mac terminal shortcut command.