Skip to content

Instantly share code, notes, and snippets.

@vrutberg
Created September 16, 2009 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrutberg/187986 to your computer and use it in GitHub Desktop.
Save vrutberg/187986 to your computer and use it in GitHub Desktop.
#!/bin/bash
wp_blogs=(
"/var/www/someblog/"
"/var/www/anotherblog/"
"/var/www/thirdblog/"
)
# get the latest wordpress files
echo "Downloading Wordpress and unpacking..."
wget -O wp.temp.tar.gz wordpress.org/latest.tar.gz
tar -xzf wp.temp.tar.gz
for blogpath in ${wp_blogs[@]}
do
echo Copying to $blogpath
cp -R wordpress/* $blogpath
done
# cleanup
echo "Removing temporary files..."
rm -rf wordpress
rm wp.temp.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment