All pastes #1738384 Raw Edit

upgrade wordpress

public shellscript v1 · immutable
#1738384 ·published 2010-01-05 04:44 UTC
rendered paste body
#!/bin/shWORDPRESS_TEMP="/var/tmp/wordpress"WORDPRESS_INSTALL="/var/www"cd /root/wordpressif [ -f "latest.tar.gz" ]; then	rm "latest.tar.gz"fiif [ ! -f "$WORDPRESS_TEMP" ]; then	mkdir $WORDPRESS_TEMPfiwget http://wordpress.org/latest.tar.gzecho -n "Extracting archive to ${WORDPRESS_TEMP}... "tar -xzf latest.tar.gz -C ${WORDPRESS_TEMP}if [ $? -ne 0 ]; then	echo "FAILED"	exit $?else	echo "DONE"fi#echo -n "Patching wordpress themes... "#patch -s -p0 ${WORDPRESS_TEMP}/wordpress/wp-includes/theme.php < wp-theme.diff#if [ $? -ne 0 ]; then#	echo "FAILED"#	exit $?#else#	echo "DONE"#fiecho "Installing wordpress into ${WORDPRESS_INSTALL}..."cp -R  ${WORDPRESS_TEMP}/wordpress ${WORDPRESS_INSTALL}if [ $? -ne 0 ]; then	echo "FAILED"	exit $?else	echo "DONE"ficd /root# Copy themes to users#echo "Copying themes to users... "#for x in `find /home -iname "blog"`; do#	echo -n "Copying $x ... "#	cp -R ${WORDPRESS_INSTALL}/wp-content/themes $x#	if [ $? -ne 0 ]; then#		echo "FAILED"#		exit $?#	else#		echo "DONE"#	fi#done