Created
September 24, 2013 15:59
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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