LOCALE="-pt_BR"
WP_CLI="/usr/local/bin/wp-cli"
BASENAME="`basename $0`"
+WHOAMI="`whoami`"
# Set alternative base
function wordpress_set_base {
wget http://br.wordpress.org/wordpress-$new$LOCALE.zip
unzip wordpress-$new$LOCALE.zip && rm wordpress-$new$LOCALE.zip
mv wordpress wordpress-$new/
- chown -R root.root wordpress-$new/
+
+ if [ "$WHOAMI" == "root" ]; then
+ chown -R root.root wordpress-$new/
+ fi
}
# Upgrade a wordpress instance using upstream source.
done
# Fix permissions
- chown -R root.root wordpress-$new/wp-content/{plugins,themes}
+ if [ "$WHOAMI" == "root" ]; then
+ chown -R root.root wordpress-$new/wp-content/{plugins,themes}
+ fi
# Set sunrise symlink
if [ -f "wordpress-$new/wp-content/plugins/wordpress-mu-domain-mapping/sunrise.php" ]; then