[wp-hackers] Quick Install WP from SVN

Beau Lebens beau at dentedreality.com.au
Tue Feb 3 20:11:18 GMT 2009


In case anyone's interested, I thought I'd share this quick shell
script I use to set up a new install of WP. Usage is like this
(assuming it's saved as a file called "wordpress" and is in your
path):

$ wordpress wp27 tags/2.7

That would install 2.7 into a directory called "wp27" and would
attempt to create a database called "wp27" as well.

It's very basic, and doesn't do any checks of any kind, but hey -- it
gets the job done. Also, this is for development purposes on a local
machine only (thus the open permissions), and is not recommended for
production/live installs.

Just paste the following into a file, call it "wordpress" (no
extension), drop it into your path and make it excutable.

Works on my Mac. YMMV.

Cheers,
Beau

---
#!/bin/sh

REV=trunk
OUTDIR=.

if [ "$1" != "" ]; then
	OUTDIR=$1
fi

if [ "$2" != "" ]; then
	REV=$2
fi

svn co http://svn.automattic.com/wordpress/${REV}/ ${OUTDIR}
sudo chmod -R 777 ${OUTDIR}
echo "CREATE DATABASE \`${OUTDIR}\`" | mysql -u root
---



-- 
Beau Lebens
Dented Reality
beau at dentedreality.com.au
http://dentedreality.com.au


More information about the wp-hackers mailing list