Skip to content

Instantly share code, notes, and snippets.

@forsvunnet
Created September 24, 2013 15:59
Show Gist options
  • Save forsvunnet/6687029 to your computer and use it in GitHub Desktop.
Save forsvunnet/6687029 to your computer and use it in GitHub Desktop.
A script to download and install wordpress in the provided folder. Will exit if the folder exists. Copy paste to aliases dot-file
function wpdl(){
if [[ -d ./${1} ]]; then
echo "Project directory exists, exiting..."
elif [[ $# = 1 ]]; then
mkdir $1
cd $1
curl -O http://wordpress.org/latest.zip
unzip latest.zip
rm latest.zip
mv wordpress/* ./
rm -r wordpress
else
echo "Usage: wpdl projectname"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment